-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHA Mqtt.txt
156 lines (155 loc) · 5.98 KB
/
HA Mqtt.txt
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#daikin AC over mqtt
mqtt
climate:
- name: "Your AC"
icon: mdi:air-conditioner
availability_topic: "your/availability/topic"
action_topic: "your/data/topic"
action_template: >-
{% if value_json.power == false %}
off
{% elif value_json.mode == 54 %}
fan
{% elif not states('binary_sensor.daikincompressor') %}
idle
{% elif value_json.mode == 50 %}
drying
{% elif value_json.mode == 51 %}
cooling
{% elif value_json.mode == 52 %}
heating
{% elif (value_json.mode == 49 or value_json.mode == 48) and (value_json.temp_inside / 10) >= (value_json.setpoint / 10) %}
cooling
{% elif (value_json.mode == 49 or value_json.mode == 48) and (value_json.temp_inside / 10) < (value_json.setpoint / 10) %}
heating
{% endif %}
power_command_topic: "your/command/topic"
power_command_template: >-
{% if value == "ON" %}
{"command":"acPower","power":true}{{'\0'}}
{% elif value == "OFF" %}
{"command":"acPower","power":false}{{'\0'}}
{% endif %}
mode_state_topic: "your/data/topic"
modes: ["auto", "off", "dry", "cool", "heat", "fan_only"]
mode_state_template: >-
{% if value_json.power == false %}
off
{% elif value_json.mode == 49 or value_json.mode == 48 %}
auto
{% elif value_json.mode == 50 %}
dry
{% elif value_json.mode == 51 %}
cool
{% elif value_json.mode == 52 %}
heat
{% elif value_json.mode == 54 %}
fan_only
{% endif %}
mode_command_topic: "your/command/topic"
mode_command_template: >-
{% if value == "auto" %}
{"command":"acHaMode","mode":49}{{'\0'}}
{% elif value == "off" %}
{"command":"acHaMode","mode":0}{{'\0'}}
{% elif value == "dry" %}
{"command":"acHaMode","mode":50}{{'\0'}}
{% elif value == "cool" %}
{"command":"acHaMode","mode":51}{{'\0'}}
{% elif value == "heat" %}
{"command":"acHaMode","mode":52}{{'\0'}}
{% elif value == "fan_only" %}
{"command":"acHaMode","mode":54}{{'\0'}}
{% endif %}
fan_mode_state_topic: "your/data/topic"
fan_modes: ["Auto", "Night", "Speed 1", "Speed 2", "Speed 3", "Speed 4", "Speed 5"]
fan_mode_state_template: >-
{% if value_json.fan == 65 %}
Auto
{% elif value_json.fan == 66 %}
Night
{% elif value_json.fan == 51 %}
Speed 1
{% elif value_json.fan == 52 %}
Speed 2
{% elif value_json.fan == 53 %}
Speed 3
{% elif value_json.fan == 54 %}
Speed 4
{% elif value_json.fan == 55 %}
Speed 5
{% endif %}
fan_mode_command_topic: "your/command/topic"
fan_mode_command_template: >-
{% if value == "Auto" %}
{"command":"acFan","fan":65}{{'\0'}}
{% elif value == "Night" %}
{"command":"acFan","fan":66}{{'\0'}}
{% elif value == "Speed 1" %}
{"command":"acFan","fan":51}{{'\0'}}
{% elif value == "Speed 2" %}
{"command":"acFan","fan":52}{{'\0'}}
{% elif value == "Speed 3" %}
{"command":"acFan","fan":53}{{'\0'}}
{% elif value == "Speed 4" %}
{"command":"acFan","fan":54}{{'\0'}}
{% elif value == "Speed 5" %}
{"command":"acFan","fan":55}{{'\0'}}
{% endif %}
current_temperature_topic: "your/data/topic"
current_temperature_template: "{{ value_json.temp_inside / 10 }}"
temperature_state_topic: "your/data/topic"
temperature_state_template: "{{ value_json.setpoint / 10 }}"
temperature_command_topic: "your/command/topic"
temperature_command_template: >-
{"command":"acTemp","temp":{{ value | int }}}{{'\0'}}
max_temp: 32
min_temp: 18
precision: 0.5
swing_modes: ["Full swing", "Only horizontal", "Only vertical", "No swing"]
swing_mode_state_topic: "your/data/topic"
swing_mode_state_template: >-
{% if value_json.swing_v and value_json.swing_h %}
Full swing
{% elif value_json.swing_h and not value_json.swing_v %}
Only horizontal
{% elif value_json.swing_v and not value_json.swing_h %}
Only vertical
{% elif not value_json.swing_h and not value_json.swing_v %}
No swing
{% endif %}
swing_mode_command_topic: "your/command/topic"
swing_mode_command_template: >-
{% if value == "Full swing" %}
{"command":"acSwing","swingV":true,"swingH":true}{{'\0'}}
{% elif value == "Only horizontal" %}
{"command":"acSwing","swingV":false,"swingH":true}{{'\0'}}
{% elif value == "Only vertical" %}
{"command":"acSwing","swingV":true,"swingH":false}{{'\0'}}
{% elif value == "No swing" %}
{"command":"acSwing","swingV":false,"swingH":false}{{'\0'}}
{% endif %}
json_attributes_topic: "your/data/topic"
json_attributes_template: >
{ "Outside Temp": {{value_json.temp_outside / 10}},
"Coil Temp": {{value_json.temp_coil / 10}},
"Fan RPM": {{value_json.fan_rpm}}
}
sensor:
#sensor of Daikin compressor frequency
- name: "Daikin Compressor Frequency"
state_topic: "your/data/topic"
value_template: "{{ value_json.compressor_freq }}"
availability_topic: "your/availability/topic"
device_class: "Frequency"
state_class: "measurement"
unit_of_measurement: "Hz"
suggested_display_precision: 0
#boolean sensor for Daikin compressor state
binary_sensor:
- name: "DaikinCompressor"
state_topic: "your/data/topic"
value_template: "{{ value_json.idle }}"
payload_on: false
payload_off: true
availability_topic: "your/availability/topic"