-
Notifications
You must be signed in to change notification settings - Fork 0
/
with-real-sensor.yaml
84 lines (75 loc) · 1.9 KB
/
with-real-sensor.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
75
76
77
78
79
80
81
82
83
84
esphome:
name: esp8266
friendly_name: esp8266
includes:
- include/irdaikin.h
libraries:
# - IRremoteESP8266
- crankyoldgit/IRremoteESP8266@^2.8.6
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "<REDACTED>"
ota:
password: "<REDACTED>"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
time:
- platform: homeassistant
timezone: Europe/London
id: esptime
binary_sensor:
# This can be a magnetic door sensor or reed switch
- platform: homeassistant
entity_id: binary_sensor.aircon_status
id: ac_status
internal: True
on_press:
then:
- delay: 2s
- if:
condition:
lambda: 'return id(air_con).mode == CLIMATE_MODE_OFF;'
then:
- climate.control:
id: air_con
# Assume cooling mode
mode: COOL
target_temperature: 25
# magic value
target_humidity: 0.0078125
on_release:
then:
- delay: 2s
- if:
condition:
lambda: 'return id(air_con).mode != CLIMATE_MODE_OFF;'
then:
- climate.control:
id: air_con
mode: "OFF"
target_temperature: 25
# magic value
target_humidity: 0.0078125
sensor:
# Actual temperature
- platform: homeassistant
id: living_room_temperature
entity_id: sensor.living_room_temperature
internal: true
climate:
# just remove the daikinac->set_sensor line if you dont have a ambient temperature sensor
- platform: custom
lambda: |-
auto daikinac = new DaikinAC();
daikinac->set_sensor(id(living_room_temperature));
App.register_component(daikinac);
return {daikinac};
climates:
- name: "AC"
id: air_con