mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 19:02:18 +01:00
Add valve component (#6447)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -125,6 +125,23 @@ lock:
|
||||
open_action:
|
||||
- logger.log: open_action
|
||||
|
||||
valve:
|
||||
- platform: template
|
||||
name: "Template Valve"
|
||||
lambda: |-
|
||||
if (id(some_binary_sensor).state) {
|
||||
return VALVE_OPEN;
|
||||
} else {
|
||||
return VALVE_CLOSED;
|
||||
}
|
||||
open_action:
|
||||
- logger.log: open_action
|
||||
close_action:
|
||||
- logger.log: close_action
|
||||
stop_action:
|
||||
- logger.log: stop_action
|
||||
optimistic: true
|
||||
|
||||
text:
|
||||
- platform: template
|
||||
name: "Template text"
|
||||
|
Reference in New Issue
Block a user