Skip to content

Instantly share code, notes, and snippets.

@dmd
Created November 2, 2025 00:22
Show Gist options
  • Select an option

  • Save dmd/fbf5d021758c859c5518e63f613995b1 to your computer and use it in GitHub Desktop.

Select an option

Save dmd/fbf5d021758c859c5518e63f613995b1 to your computer and use it in GitHub Desktop.
type: custom:mushroom-template-card
entity: switch.bedroom_autohumidity
tap_action:
action: toggle
icon: mdi:toggle-switch
primary: "{{ iif(is_state(entity,'on'), 'Humidifier is On', 'Humidifier is Off') }}"
secondary: >
{{ iif(states('sensor.awair_element_121282_humidity') in
['unknown','unavailable'],
'—',
(states('sensor.awair_element_121282_humidity') | float | round(0)) ~
(state_attr('sensor.awair_element_121282_humidity','unit_of_measurement') or '%') ~ ' RH') }}
color: "{{ 'amber' if is_state(entity, 'on') else 'grey' }}"
features_position: bottom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment