@michel72 wrote:
Hi, I need a custom template sensor that will create a state based on the attribute and state of the original sensor.
The original sensor is:
However if I set the fan speed to off, the sensor speed attribute actually remains ‘medium’, it just switches the fan off.
What I need is 1 sensor that will display the speed attribute, but not when the fan is off, so what I need is a template sensor with the following states:
Off
Low
Medium
HighI build this template:
sensor: - platform: template sensors: comfofan_state: friendly_name: "Comfofan status" entity_id: fan.esp32_fan_controller_02 value_template: "{{ state_attr('fan.esp32_fan_controller_02', 'speed') }}"
But that will only give me low, medium and high. but not off.
How to do this?
Posts: 2
Participants: 2