I integrated a ventilation position for my garage door. If the humidity gets too high, the garage door automatically opens a few centimeters.
I use the cover integration to open and close my garage door and it works flawlessly. However, if the garage door is in the ventilation position the mdi-icon shows the garage door as open.
Is there a way to add a third “position” to the integration which changes the icon if the garage door is in the ventilation position? I have a sensor for every position (open, close, ventilation).
Hi there, you would be able to achieve this by creating a new template sensor in which you can mention the icons according to state. An example would be like below.
- platform: template
sensors:
alarm_status:
value_template: '{{ states.switch.xiaomi_gateway_alarm.attributes.state_value}}'
friendly_name: 'Alarm Status'
icon: '{%- if is_state("switch.xiaomi_gateway_alarm", "on") %}mdi:shield-home{% else %}mdi:shield-home-outline{%- endif %}'
This is just an example, you could be able to substitute your entity values in this to make it work. If you need more help, do ask
You can get more details from
Thanks for the reply.
I already did that, but the problem is to get the same functionality as the garage cover. I would like to have two/three Buttons (garage door up/(stop)/ garage door down)), as well as the functionality to “disable” the individual Buttons depending on the position of the garage door (Up is disabled when door is open and vice versa).
So my goal is to have all functionalities of the garage cover integration only with the option of a third icon for the half/ventilation position.
For buttons I believe you can create scripts with conditions and use them in UI as buttons to operate the cover. You said you wanted to disable the up button when the cover is open, so just create a script which first check the condition if the cover is open or close and only after confirming that its not open, it will call the switch to open the cover. hope you can utilize this.
You can wrap your existing cover in a template cover where you have the freedom to display an icon of your liking based on any condition.