Hello!
I’m using my Daikin AC with my custom DIY IR blaster(GitHub - 00svd00/IR-Daikin-Server-ESP8266: Simple http interface to control Daikin A/C units via IR using ESP8266)
The main goal I’ve trying to achieve is to properly control it with Wear OS companion app
For now I’ve succesfully created config based on fan template device
input_boolean:
bedroom_ac_state:
initial: 0
bedroom_ac_powerfull:
name: "Bedroom AC. Powerfull"
initial: 0
bedroom_ac_quiet:
name: "Bedroom AC. Quiet"
initial: 0
bedroom_ac_eco:
name: "Bedroom AC. Eco+"
initial: 0
bedroom_ac_swing:
initial: 1
input_select:
bedroom_ac_mode:
options:
- "Cool"
- "Dry"
- "Fan"
- "Heat"
- "Auto"
initial: "Auto"
bedroom_ac_speed:
options:
- "Slowest"
- "Slow"
- "Medium"
- "Fast"
- "Fastest"
- "Auto"
initial: "Auto"
input_number:
bedroom_ac_temp:
name: "Bedroom AC. Temp"
initial: 26
min: 18
max: 32
step: 1
rest_command:
daikin_ac_on:
url: "{{ V_URL }}"
method: post
content_type: "application/x-www-form-urlencoded"
payload: "power={{ V_PWR }}&temp={{ V_TEMP }}&mode={{ V_MODE }}&fan={{ V_SPD }}&powerfull={{ V_PFL }}&quiet={{ V_QIT }}&eco={{ V_ECO }}&swingv={{ V_SWNG }}"
daikin_ac_off:
url: "{{ V_URL }}"
method: post
content_type: "application/x-www-form-urlencoded"
payload: "power={{ V_PWR }}"
fan:
- platform: template
fans:
bedroom_daikin_ac:
friendly_name: "Bedroom AC"
unique_id: "bedroom_fan_01"
value_template: "{{ states('input_boolean.bedroom_ac_state') }}"
preset_mode_template: "{{ states('input_select.bedroom_ac_mode', 'option') }}"
oscillating_template: "{% if is_state('input_boolean.bedroom_ac_swing', 'on') %}True{% else %}False{% endif %}"
percentage_template: >
{% set d = {
'Slowest': 20,
'Slow': 40,
'Medium': 60,
'Fast': 80,
'Fastest': 100,
'Auto': 0 } %}
{{ d.get( states('input_select.bedroom_ac_speed') ) }}
turn_on:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.bedroom_ac_state
- service: script.turn_on_bedroom_ac
turn_off:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.bedroom_ac_state
- service: script.turn_off_bedroom_ac
set_oscillating:
- service: "{% if is_state('input_boolean.bedroom_ac_swing', 'on') %}input_boolean.turn_off{% else %}input_boolean.turn_on{% endif %}"
target:
entity_id: input_boolean.bedroom_ac_swing
- service: script.turn_on_bedroom_ac
set_preset_mode:
- service: input_select.select_option
target:
entity_id: input_select.bedroom_ac_mode
data:
option: "{{ preset_mode }}"
- service: script.turn_on_bedroom_ac
preset_modes:
- "Cool"
- "Dry"
- "Fan"
- "Heat"
- "Auto"
speed_count: 5
set_percentage:
- service: input_select.select_option
target:
entity_id: input_select.bedroom_ac_speed
data:
option: >
{% if percentage == 20 %}
Slowest
{% elif percentage == 40 %}
Slow
{% elif percentage == 60 %}
Medium
{% elif percentage == 80 %}
Fast
{% elif percentage == 100 %}
Fastest
{% else %}
Auto
{% endif %}
- service: script.turn_on_bedroom_ac
script:
turn_on_bedroom_ac:
alias: 'Bedroom Daikin ON'
sequence:
- service: rest_command.daikin_ac_on
data:
V_URL: 'http://bedroom.ac.local/cmd'
V_PWR: "{% if is_state('input_boolean.bedroom_ac_state', 'on') %}1{% else %}0{% endif %}"
V_TEMP: "{{ states('input_number.bedroom_ac_temp')|int }}"
V_MODE: >
{% set d = {
'Cool': 3,
'Dry': 2,
'Fan': 6,
'Heat': 4,
'Auto': 0 } %}
{{ d.get( states('input_select.bedroom_ac_mode') ) }}
V_SPD: >
{% set d = {
'Slowest': 1,
'Slow': 2,
'Medium': 3,
'Fast': 4,
'Fastest': 5,
'Auto': 10 } %}
{{ d.get( states('input_select.bedroom_ac_speed') ) }}
V_PFL: "{% if is_state('input_boolean.bedroom_ac_powerfull', 'on') %}1{% else %}0{% endif %}"
V_QIT: "{% if is_state('input_boolean.bedroom_ac_quiet', 'on') %}1{% else %}0{% endif %}"
V_ECO: "{% if is_state('input_boolean.bedroom_ac_eco', 'on') %}1{% else %}0{% endif %}"
V_SWNG: "{% if is_state('input_boolean.bedroom_ac_swing', 'on') %}1{% else %}0{% endif %}"
mode: single
turn_off_bedroom_ac:
alias: 'Bedroom Daikin OFF'
sequence:
- service: rest_command.daikin_ac_off
data:
V_URL: 'http://bedroom.ac.local/cmd'
V_PWR: "{% if is_state('input_boolean.bedroom_ac_state', 'on') %}1{% else %}0{% endif %}"
mode: single
It works, but all contols are spreaded around bedroom area group and I can’t create nested area to properly group them(not supported for now)
Also I can’t control preset and temperature with Wear OS companion app
I’ve also tried to group them using legacy groups
group:
bedroom_daikin_ac_gr:
name: "Bedroom AC"
all: true
entities:
- fan.bedroom_fan
- input_number.bedroom_ac_temp
- input_boolean.bedroom_ac_powerfull
- input_boolean.bedroom_ac_quiet
- input_boolean.bedroom_ac_eco
But seems that they are deprecated and not compatible with everything else
(and also not compatible with Wear OS companion app)
Is there is better way to create such integration for AC with:
- Fan speed set
- Tempreature set
- Radio-button-like toggle
- Several checkbox-like toggles
Am I missing something?