That looks like it worked and the button does the action. It just isn’t displaying the current status. The fan power is, but, the other three just have the ‘off’ with line through the circle
Three? We only made one switch.
Sorry, I did the auto, night & oscillation at the same time. The power isn’t actually syncing either. I will have another look
- type: glance
title: Kids Bedroom
entities:
- entity: sensor.bedroom_humidity
name: "Humidity"
- entity: sensor.bedroom_temperature
name: "Temperature"
- entity: fan.bedroom
tap_action:
action: toggle
- entity: switch.fan_auto
name: "Auto Mode"
tap_action:
action: toggle
- entity: switch.fan_night
name: "Night Mode"
tap_action:
action: toggle
- entity: switch.oscillation
name: "Oscillation"
tap_action:
action: toggle
Ok but what do the template switch configuration for the others look like?
Also just to make sure my template is correct, turn on oscillating mode on your fan then go to the developer tools template editor, select everything (Ctrl+A) and paste this:
{{ is_state_attr('fan.bedroom', 'oscillating', 'true') }}
{{ is_state_attr('fan.bedroom', 'oscillating', true) }}
Do either of them reurn a true result?
False
True
Right. Then you have to change your switch templates. Remove the quotes around ‘true’ in the value and icon templates:
switch:
- platform: template
switches:
oscillation:
friendly_name: Oscillation
value_template: "{{ is_state('fan.bedroom', 'on') and is_state_attr('fan.bedroom', 'oscillating', true) }}"
turn_on:
service: fan.oscillate
data:
entity_id: fan.bedroom
oscillating: true
turn_off:
service: fan.oscillate
data:
entity_id: fan.bedroom
oscillating: false
icon_template: >
{% if is_state('fan.bedroom', 'on') and is_state_attr('fan.bedroom', 'oscillating', true) %}
mdi:arrow-left-right-bold
{% else %}
mdi:minus-circle-outline
{% endif %}
Thanks @tom_l that did the trick. The only curve ball is that when you put the fan on “auto” mode, it can turn itself off when the air quality is low, but, kicks back in when it is bad. So it isn’t really off, however, the sensor registers it as being ‘off’ when it technically isn’t.
Either way, I think that will do me for the card. It is more than I was after originally and I do appreciate all your help
The system won’t let me mark 2 solutions
You could definitely do something with this attribute to overcome that:
auto_mode: false
Just depends what you want.
I think I am happy with it. Although I am interested in knowing what would that do? Would that make auto mode totally not accessible?
That’s up to you. Having a drop down list with the following available selections
On
Auto
Off
Instead of an on off switch would be one option.
Not at all.
Interesting. I am curious as to how you would convert the glance card entry into a drop down list instead of a click button… or is it the case it would be a different item rather than the glance card I have been using?