Broadlink IR Climate Component


#571

@Vassilis Excellent work.

Is there a way to switch off the climate using google assistant ?
It always says “that mode is unavailable”.

Thanks


#572

Don’t say ‘switch it to off’, say ‘switch off the air conditioner’.


#573

Nope… Still, the same
“hey Google switch off ac”
“hey Google turn off ac”
“hey Google power off ac”
“hey Google set ac to idle”
Always says says that mode is unavailable

Turn the heat, cool, and set temperature works great.
Just don’t know how to switch it off using gogle


#574

I 'm getting this error

copied broadlink.py under “custom_components/climate/” and the ini file under “custom_components/climate/broadlink_climate_codes/fujitsu.ini’”
configuration.yaml

climate:
  - platform: broadlink
    name: Air Condition
    host: XXX
    mac: 'XXX'
    rfcodes_ini: 'custom_components/climate/broadlink_climate_codes/fujitsu.ini'
    min_temp: 16
    max_temp: 32
    default_operation: heat
    default_fan_mode: high
    customize:
      operations:
        - cool
        - heat
      fan_modes:
        - auto
        - low
        - mid
        - high

#575

Operations also need to include off, and off must be in quotes or it gets interpreted wrong (for some reason I can no longer recall).

  operations:
    - 'off'
    - cool
    - heat
    - fan_only
    - auto

#576

Check that your operations mode has an ‘off’ (and an IR code for it)? My air conditioner is also literally called ‘air conditioner’ and that’s what it is exposed to GA as; I’m not sure what affect it would have if you called it something else.


#577
################# BROADLINK RM MINI 3 ####################
  - platform: broadlink
    name: living_room_ac
    host: 192.168.1.150
    mac: 'xxxxxxxxxx'
    timeout: 15
#    type: rm_mini
    ircodes_ini: 'broadlink_climate_codes/gree.ini'
    min_temp: 16
    max_temp: 30
    target_temp: 21
    target_temp_step: 1
    temp_sensor: sensor.living_room_temperature
    default_operation: 'off'
    default_fan_mode: auto
    customize:
      operations:
        - idle
        - 'off'
        - heat
        - cool
        - auto
      fan_modes:
        - low
        - mid
        - high
        - auto

And I have the off and off command in the ini file.
It works on HA, but not on Google assistant.

And I tried off, ‘off’. Seems it don’t gets exposed to google


#578

UPDATE: it works with that conf.

I had to unlink and link again, and the state off appeared on gogle home.

Thanks


#579

I remember now, if you put just off, and not ‘off’, HA interprets it as a state, not as a string and so it doesnt work properly.


#580

I use a script to set Temperature and working with alexa

condizionatore1:
alias: “Condizionatore Letto”
sequence:
- service: climate.set_temperature
data_template:
entity_id: climate.condizionatore_letto
temperature: “{{ requested_level }}”

I think you can use the same script to switch off using google using service climate.set_operation_mode

indent preformatted text by 4 spaces
condizionatore1off:
alias: "Condizionatore Uno off"
sequence:
  - service: climate.set_operation_mode
    entity_id: climate.condizionatore_letto
    data:
      operation_mode: 'off'

#581

I have problems with voice commands.

This is my AC

climate:
  - platform: broadlink
    name: Air Condition
    host: XXXX
    mac: 'XXXX'
    ircodes_ini: 'custom_components/climate/broadlink_climate_codes/arielli.ini'
    min_temp: 16
    max_temp: 32
    default_operation: 'Off'
    default_fan_mode: High
    temp_sensor: sensor.temperature_5
    customize:
      operations:
        - 'Off'
        - Cool
        - Dry
        - Heat
      fan_modes:
        - Auto
        - Low
        - Mid
        - High

I have added - climate to exposed domains for GA and i have the manual one. Of course unlinked, relinked and synced devices multiple times.


#582

Hi,
I made some changes to the component:

Configuration simplified

  • There is no more need for the target_temp value. The target temperature is always retrieved from restore_state. If the component loads for the first time, the target temperature equals to min_temp.
  • There is no more need for default_operation value. The last operation mode is always retrieved from restore_state. If the component loads for the first time, the operation mode equals to ‘off’.
  • There is no more need for default_fan_mode. The last fan mode is always retrieved from restore_state. If the component loads for the first time, the fan mode equals the first value.

Support Off/On (Tested with Alexa)*
*The component always remembers the last ‘on’ operation, even if you restart HA.

Breaking change
The component always adding the ‘Off’ mode to the beginning of the operation list. You must remove the ‘off’ value from customize->operations in the configuration file.


#583

Man, what a great custom component! It solved all my issues with integration of my old Daikin a/c into HA.

A quick question for the future.
There is a new platform for Wi-Fi based Broadlink thermostats in development. But since it’s a Broadlink climate platform, won’t it have conflicts with this component after it’s integrated into HA officially?


#584

If this other component is created in core and uses platform: broadlink I guess this custom one will need to be slightly renamed? Although doesn’t HA just replace the core component with whatever is in the custom_components folder anyway, leaving this one to take over from the new core one…


#585

TBH I have no idea how HA behaves with custom and core components under the same name, that’s why I’m asking)) Thanks for clearing things up a bit)
But to me it seems like renaming this component to “broadlinkir” or something like that might be a good idea for the future.


#586

Yes thats right


#587

Your hint is correct. The way custom components are loaded in HA is going to change in the next versions and the problem will be addressed.


#588

I have been using this addon for a while already and was working fine. I decided last night to upgrade the addon since I am updated to the latest [0.87.1] when my climate component stopped working so I went ahead and upgraded the climate custom component as well. I copied the raw content of the files to my configuration folder but now I am getting errors.

Feb 17 01:57:51 homeassistant hass[514]: 2019-02-17 01:57:51 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.media_player.broadlink. Make sure all dependencies are installed
Feb 17 01:57:51 homeassistant hass[514]: Traceback (most recent call last):
Feb 17 01:57:51 homeassistant hass[514]:   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 117, in _load_file
Feb 17 01:57:51 homeassistant hass[514]:     module = importlib.import_module(path)
Feb 17 01:57:51 homeassistant hass[514]:   File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
Feb 17 01:57:51 homeassistant hass[514]:     return _bootstrap._gcd_import(name[level:], package, level)
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap>", line 986, in _gcd_import
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap_external>", line 673, in exec_module
Feb 17 01:57:51 homeassistant hass[514]:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
Feb 17 01:57:51 homeassistant hass[514]:   File "/home/homeassistant/.homeassistant/custom_components/media_player/broadlink.py", line 15, in <module>
Feb 17 01:57:51 homeassistant hass[514]:     from homeassistant.components.media_player.const import (
Feb 17 01:57:51 homeassistant hass[514]: ImportError: No module named 'homeassistant.components.media_player.const'
Feb 17 01:57:51 homeassistant hass[514]: 2019-02-17 01:57:51 ERROR (MainThread) [homeassistant.loader] Unable to find platform broadlink

and the configuration part:

  - platform: broadlink
    name: Hisense TV
    host: 192.168.XXX.XXX
    mac: 'XX:XX:XX:XX:XX:XX'
    ircodes_ini: 'broadlink_media_codes/hisense.ini'    
    ping_host: 192.168.XXX.XXX

and I noticed also something odd:
image

Thanks in advance for the help.


#589

Hi! Where do I need to put the custom_component.jason file? In the root config folder? Because I can’t make it work, home assistant is not finding the broalink media component.