-
Notifications
You must be signed in to change notification settings - Fork 0
/
hass-clock-01.yaml
57 lines (48 loc) · 1.13 KB
/
hass-clock-01.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
substitutions:
name: hass-clock-01
friendly_name: Clock 01
comment: NodeMCU - Clock
board: nodemcuv2
packages:
common: !include packages/common-8266.yaml
esp8266:
restore_from_flash: true
number:
- platform: template
id: brightness
name: "${friendly_name} Brightness"
icon: mdi:brightness-5
step: 1
min_value: 0
max_value: 255
optimistic: true
initial_value: 255
restore_value: true
uart:
tx_pin: D8
baud_rate: 9600
#i2c:
#time:
# - platform: ds1307
# - platform: sntp
# Example configuration entry
interval:
- interval: 1s
then:
- uart.write: !lambda
return {0x7a, (byte)id(brightness).state};
- uart.write: [0x77, 0x02]
- uart.write: [0x79, 0x00]
- uart.write: !lambda
auto s = id(hass_time).now().strftime("%H%M");
return std::vector<unsigned char>( s.begin(), s.end() );
# - interval: 1h
# then:
# - ds1307.write_time
button:
- platform: wake_on_lan
name: "Start NAS"
target_mac_address: 00:11:32:b4:00:56
- platform: wake_on_lan
name: "Start PC"
target_mac_address: 1c:69:7a:66:9e:c9