Custom switch question

Hello,

I’m trying to create a custom switch using the template platform to turn my a/c on and off. I have achieved the result but I’m not happy with how it looks:

image

I want the button to look like the one of the TV, rather than the 2 bolts.

This is my configuration.yaml entry:

switch:
  - platform: template
    switches:
      ac_switch:
        turn_on:
          service: climate.turn_on
          data:
            entity_id: climate.living_room_ac
        turn_off:
          service: climate.turn_off
          data:
            entity_id: climate.living_room_ac

And this is the switch entry in customize.yaml:

switch.ac_switch:
  friendly_name: "AC Switch"
  assumed_atate: false
  icon: mdi:fan

Any tips? Thank you!

Ok so after adding the “value_template” line and several restarts it seemed to work.

assumed_state: false

1 Like