Skip to content

Instantly share code, notes, and snippets.

@zircote

zircote/README.md

Forked from Ceralor/README.md
Created May 22, 2020
Embed
What would you like to do?
Simple Thermometer

thermostat

Simple elegant thermometer card for Home Assistant. Tweak as-needed!

# Requires the Dual Gauge HACS custom component to be installed
# Add this as a manual card, tweak as-needed.
cards:
- inner:
attribute: temperature
entity: climate.thermostat
label: Set
unit: °F
min: 40
outer:
attribute: current_temperature
entity: climate.thermostat
label: Now
unit: °F
type: 'custom:dual-gauge-card'
- cards:
- entity: binary_sensor.thermostat_heat
icon: 'mdi:fire'
name: Heating
show_name: false
tap_action:
action: call-service
service: script.hvac_mode_heat
type: entity-button
- entity: binary_sensor.thermostat_cool
hold_action:
action: call-service
service: script.hvac_mode_off
icon: 'mdi:snowflake'
name: Cooling
show_name: false
tap_action:
action: call-service
service: script.hvac_mode_cool
type: entity-button
- entity: binary_sensor.thermostat_aux_heat
hold_action:
action: none
icon: 'mdi:plus-box'
show_icon: true
show_name: false
tap_action:
action: call-service
service: script.turn_temperature_up
type: entity-button
- entity: script.turn_temperature_down
hold_action:
action: none
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
- entity: binary_sensor.thermostat_fan_on
icon: 'mdi:fan'
name: Fan On
show_name: false
tap_action:
action: call-service
service: script.fan_mode_on
type: entity-button
- entity: binary_sensor.thermostat_fan_auto
hold_action:
action: call-service
service: script.fan_mode_diffuse
icon: 'mdi:autorenew'
name: Fan Auto
show_name: false
tap_action:
action: call-service
service: script.fan_mode_auto
type: entity-button
type: horizontal-stack
type: vertical-stack
...
binary_sensor:
- platform: template
sensors:
# These first 2 aren't used currently but could be
thermostat_fan:
friendly_name: Thermostat Fan
value_template: >-
{{ not is_state_attr('climate.thermostat','fan_action','idle') }}
thermostat_hvac:
friendly_name: Thermostat HVAC
value_template: >-
{{ not is_state_attr('climate.thermostat','hvac_action','idle') }}
thermostat_aux_heat:
friendly_name: Thermostat Aux Heating
value_template: >-
{{ is_state_attr('climate.thermostat','aux_heat','on') }}
thermostat_heat:
friendly_name: Thermostat Heating
value_template: >-
{{ is_state('climate.thermostat','heat') }}
thermostat_cool:
friendly_name: Thermostat Cooling
value_template: >-
{{ is_state('climate.thermostat','cool') }}
thermostat_fan_on:
friendly_name: Thermostat Fan On
value_template: >-
{{ is_state_attr('climate.thermostat','fan_mode','on') or is_state_attr('climate.thermostat','fan_mode','diffuse') }}
thermostat_fan_auto:
friendly_name: Thermostat Fan Auto
value_template: >-
{{ is_state_attr('climate.thermostat','fan_mode','auto') or is_state_attr('climate.thermostat','fan_mode','diffuse') }}
...
turn_temperature_up:
alias: Turn Temperature Up
sequence:
- data_template:
temperature: "{{ state_attr('climate.thermostat','temperature') + 1 }}"
entity_id: climate.thermostat
service: climate.set_temperature
turn_temperature_down:
alias: Turn Temperature Down
sequence:
- data_template:
temperature: "{{ state_attr('climate.thermostat','temperature') - 1 }}"
entity_id: climate.thermostat
service: climate.set_temperature
fan_mode_on:
alias: Fan Mode On
sequence:
- entity_id: climate.thermostat
service: climate.set_fan_mode
data:
fan_mode: 'on'
fan_mode_auto:
alias: Fan Mode Auto
sequence:
- entity_id: climate.thermostat
service: climate.set_fan_mode
data:
fan_mode: 'auto'
fan_mode_diffuse:
alias: Fan Mode Circulate
sequence:
- entity_id: climate.thermostat
service: climate.set_fan_mode
data:
fan_mode: 'diffuse'
hvac_mode_heat:
alias: HVAC mode heating
sequence:
- entity_id: climate.thermostat
service: climate.set_hvac_mode
data:
hvac_mode: 'heat'
hvac_mode_cool:
alias: HVAC mode cooling
sequence:
- entity_id: climate.thermostat
service: climate.set_hvac_mode
data:
hvac_mode: 'cool'
hvac_mode_off:
alias: HVAC mode off
sequence:
- entity_id: climate.thermostat
service: climate.set_hvac_mode
data:
hvac_mode: 'off'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.