forked from randomcoffeesnob/decent-advanced-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
homeassistant.yaml
74 lines (69 loc) · 1.88 KB
/
homeassistant.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# config.yaml
sensor:
- platform: rest
resource: http://DECENT-TABLET-IP:8888/api/status/details
name: Decent Espresso Status
scan_interval: 10
value_template: "1" # This is a workaround for a bug. It does not allow a value of more than 255 characters.
json_attributes:
- state
- substate
- espresso_count
- head_temperature
- profile
I just thought this isn't needed anymore. I will add it again to the file.
json_attributes:
- state
- substate
- espresso_count
- head_temperature
- profile
switch:
- platform: rest
name: "Decent Espresso"
resource: http://DECENT-TABLET-IP:8888/api/status
body_on: '{"active": "true"}'
body_off: '{"active": "false"}'
is_on_template: "{{ value_json.is_active }}"
headers:
Content-Type: application/json
# lovelace card configuration
card:
title: Decent Espresso
type: entities
show_header_toggle: true
header:
image: 'https://de.decentespresso.com/img/de1plus_brushed_grey.jpg'
type: picture
entities:
- type: attribute
entity: sensor.decent_espresso_status
attribute: state
name: State
icon: none
- type: attribute
entity: sensor.decent_espresso_status
attribute: substate
name: Substate
icon: none
- type: attribute
entity: sensor.decent_espresso_status
attribute: head_temperature
name: Group Temperature
icon: 'mdi:temperature-celsius'
- entity: switch.decent_espresso
# example for an "useful" automation - this isn't needed
alias: Decent ready notification
description: ''
trigger:
- platform: state
entity_id: sensor.decent_espresso_status
attribute: substate
from: heating
to: ready
condition: []
action:
- service: notify.mobile_app_my_phone
data:
message: Decent is ready to use
mode: single