UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.63k stars 430 forks source link

Set the `on` state for entities in the `room` card #1423

Open TomHart opened 10 months ago

TomHart commented 10 months ago

Describe the bug I'd like to have a room card entity light us as if it was turned on when the state is a certain string, but can't find an option to do it

To Reproduce

Expected behavior Able to configure the on state value

Screenshots

Additional context

Related Logs (can be found in the browser-console (F12))

Related Card Config

---
type: custom:button-card
template:
  - card_room
  - red_no_state
name: Conservatory
entity: binary_sensor.conservatory_door
icon: mdi:greenhouse
variables:
  ulm_translation_state: "[[[ if (entity.state === 'on') return 'Open'; else return 'Closed' ]]]"
  label_use_temperature: false
  label_use_brightness: true
  entity_1:
    entity_id: binary_sensor.conservatory_occupancy
    templates:
      - yellow_on
    tap_action:
      action: none
  entity_2:
    entity_id: switch.fish_switch
    templates:
      - green_on
    tap_action:
      action: toggle
  entity_3:
    entity_id: light.wled
    templates:
      - green_on
    tap_action:
      action: toggle
  entity_4:
    entity_id: climate.conservatory_radiator_thermostat
    templates:
      - blue_on
    tap_action:
      action: toggle
    i_want_this_blue_when_state_is: 'heat' ###### THIS HERE
sylwester- commented 3 months ago

have you managed to work this out? this is the use case for me:

entity_2:
  entity_id: climate.living_room_ac_unit
  templates:
    - blue_on
  tap_action:
    action: more-info