mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[switch] Add switch.control automation action (#10105)
				
					
				
			Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
		| @@ -9,3 +9,11 @@ switch: | ||||
|     name: "Template Switch" | ||||
|     id: the_switch | ||||
|     optimistic: true | ||||
|  | ||||
| esphome: | ||||
|   on_boot: | ||||
|     - switch.turn_on: the_switch | ||||
|     - switch.turn_off: the_switch | ||||
|     - switch.control: | ||||
|         id: the_switch | ||||
|         state: !lambda return (1 > 2); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user