首先多谢 小米增强插座 和 2019最新小米token 刚入手的插座已经接入HASS。下来就要烧脑自动化了。
没办法小鸟的脑袋实在太少了。写的自动化触发不了,求大神帮忙指点。
- alias: battery100
initial_state: false
trigger:
- platform: numeric_state
entity_id: sensor.iphonex_battery_level
value_template: '{{ state.attributes.battery_level }}'
above : 90
action:
- service: switch.turn_off
entity_id: switch.mi_usb
|