forked from docteurzoidberg/my-esphome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testht16k33.yaml
executable file
·63 lines (55 loc) · 1.28 KB
/
testht16k33.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
substitutions:
devicename: "testht16k33"
friendly_name: "test ht16k33"
esphome:
name: $devicename
build_path: build/$devicename
platform: ESP32
board: esp32doit-devkit-v1
wifi: !include "common/wifi.yaml"
captive_portal:
logger:
api:
ota:
i2c:
sda: 21
scl: 22
display:
- platform: ht16k33_alpha
id: "alpha1"
address: 0x70
secondary_displays:
- address: 0x71
lambda: |-
it.print(id(text).state.c_str());
# Example configuration entry
text_sensor:
- platform: homeassistant
name: "Alarm Keypad Text"
entity_id: input_text.alarm_keypad_text
id: text
- platform: homeassistant
name: "Alarm is on"
entity_id: alarm_control_panel.alarme
id: alarmtext
on_value:
then:
lambda: !lambda |-
if(x=="armed_home") {
id(text).publish_state("A-HOME");
}
else if(x=="armed_night") {
id(text).publish_state("A-NIGHT");
}
else if(x=="armed_away") {
id(text).publish_state("ARMED");
}
else if(x=="arming") {
id(text).publish_state("ARMING");
}
else if(x=="disarmed") {
id(text).publish_state("DISARMED");
}
else {
id(text).publish_state(x);
}