Skip to content

Instantly share code, notes, and snippets.

@FiveVoltLogic
Last active January 17, 2024 10:45
Show Gist options
  • Save FiveVoltLogic/b2eb006ca4b8ad2a44aaf238dc93a6c5 to your computer and use it in GitHub Desktop.
Save FiveVoltLogic/b2eb006ca4b8ad2a44aaf238dc93a6c5 to your computer and use it in GitHub Desktop.
A mushroom template card that shows information on the current state of the heating
type: custom:mushroom-template-card
primary: Living Room
secondary: >-
{% if is_state('timer.living_room_manual_control', 'active') %} Manual
{% elif is_state('input_boolean.winter_mode', 'off') %} Disabled
{% elif is_state('input_boolean.away_mode', 'on') %} Away Mode
{% elif is_state('schedule.living_room_comfort_schedule', 'on') %}
🔥 until {{ state_attr('schedule.living_room_comfort_schedule','next_event').strftime('%H:%M') }}
{% elif is_state('schedule.living_room_presence_schedule', 'on') %}
🏃‍♂️ until {{ state_attr('schedule.living_room_presence_schedule','next_event').strftime('%H:%M') }}
{% elif state_attr('schedule.living_room_comfort_schedule','next_event') <
state_attr('schedule.living_room_presence_schedule','next_event') %}
Next 🔥 {{ state_attr('schedule.living_room_comfort_schedule','next_event').strftime('%H:%M') }}
{% elif state_attr('schedule.living_room_comfort_schedule','next_event') >
state_attr('schedule.living_room_presence_schedule','next_event') %}
Next 🏃‍♂️ {{ state_attr('schedule.living_room_presence_schedule','next_event').strftime('%H:%M') }}
{% endif %}
icon: |-
{% if is_state('timer.living_room_manual_control', 'active') %} mdi:controller-classic
{% elif is_state('input_boolean.winter_mode', 'off') %} mdi:sun-clock
{% elif is_state('input_boolean.away_mode', 'on') %} mdi:shield-home
{% elif is_state('schedule.living_room_comfort_schedule', 'on') %} mdi:radiator
{% elif is_state('schedule.living_room_presence_schedule', 'on') %} mdi:motion-sensor
{% else %} mdi:radiator-off
{% endif %}
multiline_secondary: true
fill_container: false
icon_color: >-
{% if is_state('timer.living_room_manual_control', 'active') %} purple
{% elif is_state('input_boolean.winter_mode', 'off') %} 218, 165, 32
{% elif is_state('input_boolean.away_mode', 'on') %} 199, 21, 133
{% elif is_state('schedule.living_room_comfort_schedule', 'on') or
is_state('schedule.living_room_presence_schedule', 'on') %} deep-orange
{% elif state_attr('climate.living_room_radiator', 'current_temperature') |float < 16 %} blue
{% else %} grey
{% endif %}
badge_icon: >-
{% if (is_state('binary_sensor.octopus_energy_x_xxxxxxx_octoplus_saving_sessions', 'on')) %} mdi:leaf
{% elif is_state('input_boolean.guest_mode', 'on') %} mdi:home-floor-g
{% elif is_state('binary_sensor.living_room_door', 'on') %} mdi:door-open
{% elif ((is_state('schedule.living_room_comfort_schedule', 'on')) or
(is_state('schedule.living_room_presence_schedule', 'on')) or
(is_state('timer.living_room_manual_control', 'active'))) and
((state_attr('climate.living_room_radiator', 'temperature') | float) >
(state_attr('climate.living_room_radiator', 'current_temperature') | float))
%} mdi:fire
{% elif (is_state('schedule.living_room_comfort_schedule', 'off') and
(is_state('schedule.living_room_presence_schedule', 'off') and
(state_attr('climate.living_room_radiator', 'current_temperature') | float) <
16)) %} mdi:thermometer-low
{% else %}
{% endif %}
tap_action:
action: more-info
hold_action:
action: none
double_tap_action:
action: none
badge_color: >-
{% if (is_state('binary_sensor.octopus_energy_x_xxxxxxxx_octoplus_saving_sessions',
'on')) %} green
{% elif is_state('input_boolean.guest_mode', 'on') %} green
{% elif is_state('binary_sensor.living_room_door', 'on') %} amber
{% elif ((is_state('schedule.living_room_comfort_schedule', 'on')) or
(is_state('schedule.living_room_presence_schedule', 'on')) or
(is_state('timer.living_room_manual_control', 'active'))) and
((state_attr('climate.living_room_radiator', 'temperature') | float) >
(state_attr('climate.living_room_radiator', 'current_temperature') | float))
%} red
{% elif (is_state('schedule.living_room_comfort_schedule', 'off') and
(is_state('schedule.living_room_presence_schedule', 'off') and
(state_attr('climate.living_room_radiator', 'current_temperature') | float) <
16)) %} blue
{% else %}
{% endif %}
entity: climate.living_room_radiator
layout: vertical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment