1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-18 01:33:51 +01:00

Add is_on and is_off conditions for the fan component (#2225)

Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
This commit is contained in:
Chris Nussbaum
2021-09-01 19:16:11 -05:00
committed by GitHub
parent 9937ad7fa0
commit a4d024f43d
3 changed files with 46 additions and 0 deletions

View File

@@ -129,6 +129,8 @@ mqtt:
- mqtt.connected:
- light.is_on: kitchen
- light.is_off: kitchen
- fan.is_on: fan_speed
- fan.is_off: fan_speed
then:
- lambda: |-
int data = x["my_data"];
@@ -1868,6 +1870,7 @@ fan:
oscillation_output: gpio_19
direction_output: gpio_26
- platform: speed
id: fan_speed
output: pca_6
speed_count: 10
name: 'Living Room Fan 2'