Hi! Can someone help me out with this?
Ik have this Home Connect integration and it does display every part of the Oven as a separate sensor. So like the sensor names are:
switch.oven_power (values: on or off)
switch.oven_program_preheating (on or off)
sensor.oven_program_progress (xxx%)
I wish to display the state of the oven in a picture-glance. So, I can show the state of the oven with the corresponding picture.
1 oven_off.png
2 oven_on.png
3 oven_pre.png
4 oven_baking.png
5 oven_finshed.png
The problem is, there are multiple sensors. So, I can’t use state_image with:
state_image:
“1”: /local/ oven_off.png
“2”: /local/ oven_on.png
“3”: /local/ oven_pre.png
Etc.
Is there someone who knows a solution for this?
I was thinking of a template that can combine the sensor entity’s and generate an new oven.entity with a state from 1 to 5 or something. From that state, I can use the picture glance with state_image: 1, 2, 3 etc.
Such a state could be calculated by IF switch.oven_power is on AND switch.oven_program_preheating is on AND sensor.oven_program_progress is < 1% THEN state must be 3. For example.
I can’t get my head around this how I should program such a template. Is there someone that understands the templating deeply enough to get me underway? I’ve been breaking my head on this all day.
I wish to use the standard out of the box home assistant tools, no custom components.
I’m trying a simpler template below (skipping the preheating part). But I get an template running error in the /developer-tools/template/ It’s not telling why. Not getting it fixed today. I’ts late, need to continue another day. Maybe it has something to do with is_state
Yeah! It’s working. This example can be used to drive state-image in a picture glance the lovelace frontend. I’ve been adding other sensors then I mentioned before in my request.
Maybe it’s nice to add it to the documentation for other users at. https://www.home-assistant.io/integrations/home_connect/
Aldough I understand there are mabye other ways to archive the goal if you’r really good at templating. I’m continuing to finetune it now.
sensor:
- platform: template
sensors:
oven:
friendly_name: "Oven"
value_template: >-
{% if is_state('switch.oven_power','off') %}
Standby
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_600watt','off') and is_state('switch.oven_program_hotair','off') and is_state('switch.oven_program_pizzasetting','off') and is_state('switch.oven_program_preheating','off') and is_state('switch.oven_program_topbottomheating','off') %}
Power-on
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_600watt','off') and is_state('switch.oven_program_hotair','off') and is_state('switch.oven_program_pizzasetting','off') and is_state('switch.oven_program_preheating','on') and is_state('switch.oven_program_topbottomheating','off') %}
Preheat
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_600watt','on') %}
Microwave
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_hotair','on') %}
4Dhotair
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_pizzasetting','on') %}
Pizza
{% elif is_state('switch.oven_power','on') and is_state('switch.oven_program_topbottomheating','on') %}
Toptobottom
{% else %}
Finished
{% endif %}
And the corresponding picture-glance could look like this:
Because some sensors didn’t work at all, they don’t get a value from Siemens.
Other sensors look great on first sight, but complicated the formula then using. For example the duration behaviour is not always useable or the same on every machine.
If you have a different machine, you can also have different sensors then in the example.
Probably also works on Bosch Home Connect.
You can modify the code for other Home Connect appliances. Other sensors mean other possabilities!
Make your own graphics (I can’t supply them, but you could screen copy them form the official siemens app for example…) Aldough the naming suggest lots of images, I actually recylce 1 PNG picture for all programs, I don’t have photo’s of them all
hi there, do you have templates for other devices such as oven, cooker & glassdraft/downdraft? Also it would be nice if you share a example picture as i am fairly new to HA i am not sure if i should start reading into it or if i queue this for later