Creating custom action button for entity

A little lost I got everything setup pretty easily but now I want to create a button the performs a specific action like a Power On/Off toggle. Below is the entity I’m trying to create the button for. I’ve looked around haven’t found any guide or docs on it. Just need someone to point me in the right direction.

I think you may find what you want in the template switch (

Thanks that got me in the right direction. I ended up re-doing the intergration and using the smartcast one. I can now get the status with the template however the toggle button on the dashboard isn’t working.

  - platform: template
        value_template: "{{ is_state('media_player.vizio_smartcast', 'on') }}"
          service: switch.turn_on
            entity_id: media_player.vizio_smartcast_on
          service: switch.turn_off
            entity_id: media_player.vizio_smartcast_off


I don’t have any experiences on Vizio thing, but i think you can try following.

          service: media_player.turn_on
            entity_id: media_player.vizio_smartcast

How do you know what actions are available for each entity? Is there away to get a list?

I’ve found in the media player entity of home assistant (

Light bulb just clicked on thanks. The first part of the entity id is the service. Stumbled upon node red which is the kind of programming I do.