Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shopping list integration > multiple list integration #291

Open
jcallaghan opened this issue Mar 12, 2022 · 1 comment
Open

Shopping list integration > multiple list integration #291

jcallaghan opened this issue Mar 12, 2022 · 1 comment

Comments

@jcallaghan
Copy link
Owner

Quest to see if can make a multiple-list integration similar to the shopping list integration and shopping list card.

image

@alphasixtyfive
Copy link

Built-in shopping list integration is simply reading from and writing to a json file /config/.shopping_list.json. I have recently created a command_line sensor which reads that file every 5 seconds.

- platform: command_line
  name: Shopping list
  command: "jq -r '{complete: [.[] | select(.complete==true)], incomplete: [.[] | select(.complete==false)]}' /config/.shopping_list.json"
  value_template: "{{ value_json.incomplete | length }}"
  json_attributes:
    - complete
    - incomplete
  scan_interval: 5

I'm currently using it to sync with Yandex Station and Telegram bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants