Fujitsu Air Conditioning integration - Airstage dongle

Anyways you get pretty far already with standard rest integration and some scripts and conditional cards

configuration.yaml just paste at bottom and offcourse replace the AIRCOIP and AIRCOMAC in the copied text → restart HA after for configuration to take

rest_command:
  airco_bedroom_on:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_onoff":"1"}}'
  airco_bedroom_off:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_onoff":"0"}}'
  airco_bedroom_eco_on:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_economy":"1"}}'
  airco_bedroom_eco_off:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_economy":"0"}}'
  airco_bedroom_fanctrl_on:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_fan_ctrl":"1"}}'
  airco_bedroom_fanctrl_off:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_fan_ctrl":"0"}}'
  airco_bedroom_pwrfull_on:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_powerfull":"1"}}'
  airco_bedroom_pwrfull_off:
    url: http://aircoip/SetParam
    method: POST
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_powerfull":"0"}}'
  airco_bedroom_set_temp:
    url: http://aircoip/SetParam
    method: POST
    payload: >
      {% set bedroomtemp = (states('input_number.setaircotempbedroom') | float  * 10) | int %}
      {"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_set_tmp":"{{ bedroomtemp }}"}}
  airco_bedroom_setmode:
    url: http://aircoip/SetParam
    method: POST
    payload: >
      {% set aircomodes = {"Auto": 0, "Cooling": 1,"Dry": 2,"Fan": 3,"Heating": 4} %}
      {% set opmode = aircomodes[states('input_select.setaircoopmodebedroom')]  %}
      {"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"02","value":{"iu_op_mode":"{{ opmode }}"}}
  

rest:
  - resource: http://aircoip/GetParam
    scan_interval: 60
    payload: '{"device_id":"aircomac","device_sub_id":0,"req_id":"","modified_by":"","set_level":"03","list":["iu_set_tmp","iu_indoor_tmp","iu_outdoor_tmp","iu_onoff","iu_economy","iu_fan_ctrl","iu_fan_ctrl","iu_powerful","ou_low_noise"]}'
    binary_sensor:
      - name: "Airco Bedroom On"
        value_template: "{{ value_json['value']['iu_onoff'] }}"
      - name: "Airco Bedroom Economy"
        value_template: "{{ value_json['value']['iu_economy'] }}"
        icon: mdi:leaf
      - name: "Airco Bedroom Fan Control"
        value_template: "{{ value_json['value']['iu_fan_ctrl'] }}"
        icon: mdi:fan
      - name: "Airco Bedroom Powerfull"
        value_template: "{{ value_json['value']['iu_powerful'] }}"
        icon: mdi:fan-plus
      - name: "Airco Bedroom Low Noise"
        value_template: "{{ value_json['value']['ou_low_noise'] }}"
        icon: mdi:sleep
    sensor:
      - name: "Temp Outside Airco Bedroom"
        value_template: "{{ (((value_json['value']['iu_outdoor_tmp'] | float  / 100 ) - 32 ) * 5/9) | round(2) }}"
        unit_of_measurement: "°C"
      - name: "Temp Inside Airco Bedroom"
        value_template: "{{ (((value_json['value']['iu_indoor_tmp'] | float  / 100 ) - 32 ) * 5/9) | round(2) }}"
        unit_of_measurement: "°C"
      - name: "Requested Temp Airco Bedroom"
        value_template: "{{ (value_json['value']['iu_set_tmp'] | float / 10 )| round(2) }}"
        unit_of_measurement: "°C"

Scripts ( Settings > Automations & Scenes > Scripts) Add 2 scripts and paste the 2 scripts yaml

alias: Turn On Airco Bedroom
sequence:
  - service: rest_command.airco_bedroom_on
    data: {}
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: binary_sensor.airco_bedroom_on
mode: single
icon: mdi:air-conditioner

alias: Turn Off Airco Bedroom
sequence:
  - service: rest_command.airco_bedroom_off
    data: {}
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: binary_sensor.airco_bedroom_on
mode: single
icon: mdi:air-conditioner

Dashboard on / off button
image

Paste in yaml in a new manual card replace code with below

square: true
type: grid
cards:
  - type: conditional
    conditions:
      - entity: binary_sensor.airco_bedroom_on
        state: 'off'
    card:
      show_name: true
      show_icon: true
      type: button
      tap_action:
        action: call-service
        service: script.turn_on_airco_bedroom
        target: {}
      hold_action:
        action: none
      icon: mdi:air-conditioner
      name: Airco
      show_state: false
      entity: binary_sensor.airco_bedroom_on
  - type: conditional
    conditions:
      - entity: binary_sensor.airco_bedroom_on
        state: 'on'
    card:
      show_name: true
      show_icon: true
      type: button
      tap_action:
        action: call-service
        service: script.turn_off_airco_bedroom
        target: {}
      hold_action:
        action: none
      icon: mdi:air-conditioner
      name: Airco
      show_state: false
      entity: binary_sensor.airco_bedroom_on
columns: 4

Automation to update requested Temperature based on helper:
Create Helper under Settings > Devices and Entities > Helpers > Create helper


Input Helper for the dropdown to change mode

Automation , create 2 automations in gui and paste the yaml

alias: Airco bedroom temp Update
description: ""
trigger:
  - platform: state
    entity_id:
      - input_number.setaircotempbedroom
condition: []
action:
  - service: rest_command.airco_bedroom_set_temp
    data: {}
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: sensor.requested_temp_airco_bedroom
mode: single

alias: Airco bedroom mode change
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.setaircoopmodebedroom
condition: []
action:
  - service: rest_command.airco_bedroom_setmode
    data: {}
  - service: homeassistant.update_entity
    data: {}
    target:
      entity_id: sensor.requested_temp_airco_bedroom
mode: single


image

5 Likes