simple-thermostat
simple-thermostat copied to clipboard
Hide state brackets text and button color/text
Describe the bug Hello How can i hide the state text part that is in brackets (Heat) (Off) ?
My thermostat (home assistant generic thermostat) has the hvac modes off/heat and it has the hvac actions off/idle/heating.
Is there any way i can make it that the button color is grey in idle and only orange when heating ? Also the text on the button says heat i would like it to read idle when idle and Heat when heating.
I also tried with version: 3, but then operation only says idle/heat and no heating anymore.
Thanks for your help.
YAML `type: custom:simple-thermostat entity: climate.martin_thermostat sensors:
- entity: sensor.martin_humidity
name: Humidity
layout:
mode:
names: true
icons: true
headings: false
header:
name: Martin
faults:
- entity: binary_sensor.window_martin icon: mdi:window-open-variant`
Screenshots
version 3
Browser
- OS: Windows 10
- Browser: Brave
- Simple Thermostat version from browser console: 2.4.3
- Home Assistant version: 2022.4.6
I would also like a way to hide the state text in brackets so the State only shows hvac_action.
I stumbled upon this issue about state brackets, but as I did manage to find a solution, I'm sharing it here.
Version 3 seems to be the way...
- type: custom:simple-thermostat
version: 3
So state entities shows like this:
For temperature unit, I did this:
sensors:
- id: temperature
label: '{{ui.currently}}'
template: '{{current_temperature|formatNumber}} °C'
But also, I could split hvac mode & heater switch in two separate states, by adding my heater switch
sensors:
- label: Heater
entity: switch.ab_heater
And my card shows now like this:
Version 3 is documented here: https://github.com/nervetattoo/simple-thermostat/blob/master/examples/sensors.md
Just one more thing. If instead of hvac mode you want hvac action...
- id: state
template: '{{hvac_action}}'
label: '{{ui.operation}}'
Using version 3 messes up the rest of my setup for example the sensor I have for my air purifier just states On/Off instead of air quality number. Looks like it disregards attribute.
Code:
sensors:
- entity: fan.levoit
attribute: air_quality
name: Air Quality
Using version 3 messes up the rest of my setup for example the sensor I have for my air purifier just states On/Off instead of air quality number. Looks like it disregards attribute.
Code:
sensors: - entity: fan.levoit attribute: air_quality name: Air Quality
I don't have one of those, but I would try something like
sensors:
- entity: fan.levoit
label: Air Quality
template: '{{air_quality}}'
That works perfectly, sorry but I have another question, my motion detector with v3 shows on/off instead of detected/clear. So I created this template:
{% if is_state("binary_sensor.upstairs_occupancy", "on") -%}
Detected
{%- else -%}
Clear
{%- endif %}
How do I include this as template similar to how you did template: '{{air_quality}}' or is creating a new template sensor the only option?
I don't think there is a way to map output values. A template sensor seems to be the way to go.
That works perfectly, sorry but I have another question, my motion detector with v3 shows on/off instead of detected/clear. So I created this template:
{% if is_state("binary_sensor.upstairs_occupancy", "on") -%} Detected {%- else -%} Clear {%- endif %}
How do I include this as template similar to how you did template: '{{air_quality}}' or is creating a new template sensor the only option?
how does look your complete card with this if command? - Or do you have create a real template in config.yaml?