recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Meal plan integration to Home Assistant

Open timdonovanuk opened this issue 3 years ago • 12 comments

Is your feature request related to a problem? Please describe. I'd like to surface the weekly meal plan outside of Tandoor for my family to view

Describe the solution you'd like Homeassistant is a hugely popular open source application with integrations to many many things. Many people use it for dashboarding their entire lives and homes - an integration to Tandoor to show weekly meals would be a very obvious integration that would be handy.

Describe alternatives you've considered Screenshotting the meal plan and putting it as an image

Additional context HACS is a 3rd party community of add-ons for Homeassistant - this would be the perfect place to list a Homeassistant integration. Grocy, todoist, OurGroceries etc have integrations provided via this, e.g. https://community.home-assistant.io/t/home-assistant-community-add-on-grocy/112422

timdonovanuk avatar Aug 08 '21 10:08 timdonovanuk

very nice idea. I am pretty sure that there is a home assistant issue open somewhere #354

i myself have a homeassistant instance running and can see some good use cases for integration.

I will leave this open and when i start looking into home assistant collect every idea from all issues.

Note to myself: shopping list management (similar to telegram bot)!

vabene1111 avatar Aug 09 '21 09:08 vabene1111

How about the integrating with the native Home Assistant grocery list? https://www.home-assistant.io/integrations/shopping_list/

tbhsm avatar Nov 28 '21 12:11 tbhsm

yes, when integrating with HA we will likely integrate all features possible

vabene1111 avatar Nov 30 '21 08:11 vabene1111

Is anyone working on this? I'm wondering if there is a way to update the shopping list on HomeAssistant when the Tandoor shopping list is updated via the API

gerardsyd avatar Nov 10 '22 05:11 gerardsyd

there are currently no web hooks or similar in tandoor, but you could have a small script periodically sync using the api. I sadly wont really have the time to work on this for a while but feel free to take a look.

vabene1111 avatar Nov 10 '22 06:11 vabene1111

@tbhsm

Ok, I've played around with this and managed to get this working. It's very simple in that it simply runs every 30 minutes and pulls the shopping list from tandoor across to home assistant. It also then checks off the items in tandoor. I've set it up using pyscript (see here) which allows for it to be run as a service so can manually sync at any time through a simple service call. This will need to be saved under /pyscripts/apps/ For security, you'll need to add your URLs for your home assistant and tandoor instance as well as auth tokens for HA and Tandoor (read and write) within the YAML config for pyscripts. This is how I have it set up (using a separate file for secrets):

pyscript:
  allow_all_imports: true
  hass_is_global: true
  apps:
    tandoor_sync:
      tandoor_url: !secret tandoor_url
      tandoor_read_token: !secret tandoor_read_token
      tandoor_write_token: !secret tandoor_write_token
      ha_url: !secret ha_url
      ha_token: !secret ha_token

Obviously can make it more complex with two-way sync and checking items match without the quantity etc but this does the job and is simple. Open to suggestions!

gerardsyd avatar Mar 07 '23 04:03 gerardsyd

Is your feature request related to a problem? Please describe. I'd like to surface the weekly meal plan outside of Tandoor for my family to view

Describe the solution you'd like Homeassistant is a hugely popular open source application with integrations to many many things. Many people use it for dashboarding their entire lives and homes - an integration to Tandoor to show weekly meals would be a very obvious integration that would be handy.

Describe alternatives you've considered Screenshotting the meal plan and putting it as an image

Additional context HACS is a 3rd party community of add-ons for Homeassistant - this would be the perfect place to list a Homeassistant integration. Grocy, todoist, OurGroceries etc have integrations provided via this, e.g. https://community.home-assistant.io/t/home-assistant-community-add-on-grocy/112422

@timdonovanuk Is this something you still want?

I can probably whip up a simple sensor in HA using python / pyscript to surface the meal plan in HA that you could then pop somewhere into lovelace?

gerardsyd avatar Mar 07 '23 23:03 gerardsyd

Thanks! I'm not actively using Tandoor anymore, but perhaps some other people may find it useful? Might be worth looking at the Mealie HA integration for ideas https://hay-kot.github.io/mealie/documentation/community-guide/home-assistant/

timdonovanuk avatar Mar 08 '23 10:03 timdonovanuk

thanks for the feedback on this, will look into it at some point

vabene1111 avatar Mar 14 '23 20:03 vabene1111

Is your feature request related to a problem? Please describe. I'd like to surface the weekly meal plan outside of Tandoor for my family to view Describe the solution you'd like Homeassistant is a hugely popular open source application with integrations to many many things. Many people use it for dashboarding their entire lives and homes - an integration to Tandoor to show weekly meals would be a very obvious integration that would be handy. Describe alternatives you've considered Screenshotting the meal plan and putting it as an image Additional context HACS is a 3rd party community of add-ons for Homeassistant - this would be the perfect place to list a Homeassistant integration. Grocy, todoist, OurGroceries etc have integrations provided via this, e.g. https://community.home-assistant.io/t/home-assistant-community-add-on-grocy/112422

@timdonovanuk Is this something you still want?

I can probably whip up a simple sensor in HA using python / pyscript to surface the meal plan in HA that you could then pop somewhere into lovelace?

Wanted to comment on this because I'd find this to be a useful feature.

My primary use case is a "good morning" Lovelace view on my bedroom TV. Sort of a "what to expect today" (weather, traffic, morning appointments... and ideally meals for the day via Tandoor).

In my case, I wouldn't even require it to be clickable, but that would certainly be nice eventually.

I think an option to show all meals for the day and/or next "X number" of meals would be good config options. Picture/thumbnail is a plus, but not necessary.

csw3190 avatar Jan 05 '24 20:01 csw3190

If you're happy to use pyscript to 'hack' it together, I can work up a little script that will get you that information in a sensor. You can then pull that sensor into your view / card.

gerardsyd avatar Jan 23 '24 23:01 gerardsyd

If you're happy to use pyscript to 'hack' it together, I can work up a little script that will get you that information in a sensor. You can then pull that sensor into your view / card.

I think that would be great. Thank you

csw3190 avatar Jan 24 '24 01:01 csw3190