Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch:
- - platform: dlink
- name: coffee
- host: x.x.x.x
- username: admin
- password: !secret dlink_password
- sensor:
- - platform: template
- sensors:
- coffee_consumption:
- value_template: "{{float(states.switch.coffee.attributes['power_consumption'].split(' ')[0] if states.switch.coffee else 0)}}"
- friendly_name: 'Coffee Machine Consumption'
- unit_of_measurement: 'W'
- automation:
- - action:
- - data:
- message: Water tank is empty.
- title: Coffee Machine
- service: notify.all
- alias: Coffee Machine tank empty
- condition:
- - condition: state
- entity_id: switch.coffee
- state: 'on'
- id: '1514720198787'
- # heating element was inactive for 15 minutes but machine is still on
- trigger:
- - above: '5'
- below: '500'
- for:
- minutes: 15
- entity_id: sensor.coffee_consumption
- platform: numeric_state
Add Comment
Please, Sign In to add comment