iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
434 stars 56 forks source link

Trying to do this... service: climate.set_hvac_mode, data: entity_id: climate.living_room, hvac_mode: "${hvac_mode}" #55

Closed danielbrunt57 closed 3 years ago

danielbrunt57 commented 3 years ago
type: 'custom:config-template-card'
variables: 
  hvac_mode: states.input_select.living_room_hvac_mode.state
entities:
    - input_select.living_room_hvac_mode
card:
  type: entities
  show_header_toggle: false
  entities:
    - entity: input_select.living_room_hvac_mode
    - type: call-service
      icon: 'mdi:thermostat'
      action_name: Change HVAC Mode...
      name: ' '
      service: climate.set_hvac_mode
      data:
        entity_id: climate.living_room
        hvac_mode: "${hvac_mode}"

But the UI is not accepting it. If I change it to:

type: 'custom:config-template-card'
variables: 
  hvac_mode: states.input_select.living_room_hvac_mode.state
entities:
    - input_select.living_room_hvac_mode
card:
  type: entities
  show_header_toggle: false
  entities:
    - entity: input_select.living_room_hvac_mode
    - type: call-service
      icon: 'mdi:thermostat'
      action_name: Change HVAC Mode...
      name: ' '
      service: climate.set_hvac_mode
      data:
        entity_id: climate.living_room
        hvac_mode: heat

the editor is happy. Am I doing something wrong or is it not supported??

iantrich commented 3 years ago

What do you mean by "happy"?

danielbrunt57 commented 3 years ago

The editor is happy with heat but not a template.

My apologies for trying to do the impossible.

iantrich commented 3 years ago

You have still not made it clear what you mean by "happy"? I really don't need to see your config for a different thing...?