[Home](../README.md) | Switches | [Actions](Actions.md) | [Templates](Templates.md) | [Battery Reporting](../BatteryReporting.md) | [Trouble Shooting](../TroubleShooting.md) | [Versions](../Versions.md) # Switches In order to facilitate custom switches at this time, you must create a template switch in HomeAssistant. ```yaml switch: - platform: template switches: : friendly_name: value_template: turn_on: service: data: entity_id: : turn_off: service: data: entity_id: : ``` Then you can use the following in your config: ```json { "entity": "switch.", "name": "", "type": "toggle" } ``` ## Example - Covers ```yaml switch: - platform: template switches: cover: friendly_name: Cover value_template: "{{ is_state('cover.cover', 'open') }}" turn_on: service: cover.open_cover data: entity_id: cover.cover turn_off: service: cover.close_cover data: entity_id: cover.cover ``` Then you can use the following in your config: ```json { "entity": "switch.cover", "name": "Cover", "type": "toggle" } ```