Ambi Climate 2 Component

Ambi Climate is a Smart Thermostat for mini-split, multi-split or window systems that work with IR controls, similar to Sensibo, Tado and Flair.
Link: https://www.ambiclimate.com/en/
API Link: https://api.ambiclimate.com/doc/api

It’s been integrated into homebridge (https://www.npmjs.com/package/homebridge-ambiclimate). I’d give this a shot myself but my coding skills are terrible.

1 Like

Hi @Danielhiversen,

you did a really good job on this integration. I just installed and it works.
There are only some downsides that I would like to understand:

  1. hvac_mode: there are only [HVAC_MODE_HEAT, HVAC_MODE_OFF], I checked the source code and I guess you had to choose at least one mode to manage the “on” state of Ambi Climate and you choose “heat” instead of “cool”. Is my assumption correct? So Ambi Climate at the moment can’t tell you which mode is on: heat or cool. Do you think would be a big problem to set HVAC_MODE_COOL instead?
  2. attribute temperature: there is something weird with this value, because the value I get is the app temperature + 1. If I set 25 in the app, I get 26 in this attribute; what could it be? Did it happpened to you?
  3. Finally the standard HA thermostat card doesn’t work well with ambi climate entity. What I mean is that it is possible to turn on/off but it is not possible to change temperature because it calls the service climate.set_temperature instead of ambiclimate.set_temperature_mode. So my question is: what kind of card do you use to control ambiclimate entity?

Thanks for any help you can give me.
Marco

@antivirus68, do you have your HA instance reachable from the internet?

I tried this component and could not get it to work. I am thinking this is because the AmbiClimate service needs to be able to talk to HA, through the callback url you have to create, but the instructions are not clear on this. It is also possible that the callback url can be for your local network if the device itself (which is on the same local network) is the one doing the callback.

Any feedback on how you set this up would be appreciated.

Hi @TheOncomingAutomatio,

yes I have my HA instance reachable from internet with duckdns for security reasons.

So I followed these steps:

  1. create app on ambi climate and set the callback https://mydomain/api/ambiclimate

  2. add to configuration.yaml

ambiclimate:
   client_id: CLIENT_ID
   client_secret: CLIENT_SECRET
  1. restart HA

  2. goto Settings -> Integration and click the plus button on the bottom right, select Ambiclimate

  3. Now you should get a message with a link to Ambiclimate to start authorization process. In this same message you should see exactly which is your callback. Following the link you should get a ambiclimate page that asks for authorization, just select “accept” button and you are asked to save a file. Just save the file wherever you want, it doesn’t matter (I saved on a temp folder of my pc).

  4. Go back to HA and select “Submit” button, you should get a message that confirm that you successfully added ambiclimate and you should see your ambiclimate unit called: climate.[some_name]

Hope this could help
Marco

  1. Yes, only [HVAC_MODE_HEAT, HVAC_MODE_OFF] are currently supported.

  2. Do not experience that here

  3. It works fine with default lovelace thermostat card here

Do you see any error in the log?

Ok

About the HVAC mode I think it is possible to support it using this API https://api.ambiclimate.com/api/v1/device/ir_feature but it is a bit of work.

About the thermostat card problem, I’ve already opened an issue and I believe you’ve already made a fix. You can check my answer here https://github.com/home-assistant/home-assistant/issues/26170.

Thanks
Marco

hello.
I receive an error while configuring ambiclimate in hassio.

Invalid config for [ambiclimate]: [platform] is an invalid option for [ambiclimate]. Check: ambiclimate->ambiclimate->platform. (See /config/configuration.yaml, line xx). Please check the docs at https://home-assistant.io/integrations/ambiclimate/

do you know why?
my yaml is …

ambiclimate:
  client_id: xxx
  client_secret: xxx

Hi Daniel,

Thanks for your contribution to the community. May I seek your help for one issue regarding the integration. Followed instructions from https://www.home-assistant.io/integrations/ambiclimate. Worked previously but got error in the new release of HA ( Home Assistant 0.110.2).

The ambiclimate integration threw error during configuration:

Authenticate Ambiclimate

Translation Error: The intl string context variable “b” was not provided to the string “Please follow this link and Allow access to your Ambiclimate account, then come back and press Submit below.
(Make sure the specified callback url is {cb_url})”

**** end of error ****
When I clicked the link in the message, there was no response. If open the link to a new tab, it open the same page of integration configuration as above.

Have you came across this before? Any hints? Your advice will be much appropriated.

1 Like

Hey bro, thank you for your work, is it possible this integration would support cooling, fan, heat dry mode? Thank you

Should be fixed in next release

I do not plan to add it, but all contributions are welcome

May I know how can i set up the callback url?

Am I missing something? The Thermostat card issue was closed but it’s in fact still broken (Heat on/off only).

I would like to know this too. I am unable to set up the Ambiclimate integration despite following the instructions.

I first created an app here (https://api.ambiclimate.com/clients), where the callback url is the remote Nabu Casa link that looks like https://<unique_nabu_casa_link>.ui.nabu.casa/api/ambiclimate

Then I added these lines into the configuration.yaml, saved it, and restarted:

# Ambiclimate
ambiclimate:
  client_id: xxx
  client_secret: xxx

After that, I went to Configuration > Integration > Add Integration > Ambiclimate:
image

Somehow, the Callback URL that shows up is the local link, instead of the external Nabu Casa link I used to create the app in Ambiclimate. Following the link just shows me a JSON 404 error:

{
  "description": "not found", 
  "error": 404
}

Appreciate any help I can get to setup the Ambiclimate integration!

I finally got it set up! I fiddled with the configuration and got it to work.

What helped me is setting both the External URL and Internal URL in Configuration > General to the Nabu Casa link, like below:

image

Doing that fixes the callback URL in the Ambiclimate integration auth link.

Weirdly, adding that link just into the External URL in Configuration > General did not work. I had to add it into both Internal and External.

Hope this helps whoever who reads this in the future!

1 Like

I’m glad you did, I’ve been trying for a while. Where did you find this Internal URL and External URL setting? I am using version 2021.1.5 and when I enter Configuration > General this option does not appear. Only data such as house name, place, Time Zone … Could you help me, please?

Thank you!

That’s odd, my Configuration > General looks like this:

My system info copied from Configuration > Info is as below (installed on Raspberry Pi 4 Model B, 4GB RAM):

System Health

version: 2021.1.5
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
virtualenv: false
python_version: 3.8.7
os_name: Linux
os_version: 5.4.79-v8
arch: aarch64
timezone: <redacted>


GitHub API: ok
Github API Calls Remaining: 900
Installed Version: 1.10.1
Stage: running
Available Repositories: 709
Installed Repositories: 2


logged_in: true
subscription_expiration: February 22, 2021, 8:00 AM
relayer_connected: true
remote_enabled: true
remote_connected: true
alexa_enabled: true
google_enabled: true
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok


host_os: Home Assistant OS 5.10
update_channel: stable
supervisor_version: 2021.01.7
docker_version: 19.03.13
disk_total: 28.6 GB
disk_used: 2.3 GB
healthy: true
supported: true
board: rpi4-64
supervisor_api: ok
version_api: ok
installed_addons: File editor (5.2.0), Samba share (9.3.0), Terminal & SSH (8.10.0)


dashboards: 1
mode: storage
views: 1
resources: 0

Hi,

This post helped solve the problem—apparently, the bug is still there after all these years.

The settings @thedrinkeno mentions are now in Settings | System | Network

They’re now under “Home Assistant URL” and they’re called ‘Internet’ and ‘Local Network’. If you’re using Home Assistant Cloud, which I was, Ambi will get the wrong callback URL apparently; I disabled HAC and changed it to the ‘normal’ URL I get from the DuckDNS add-on, and it worked.

Sad news for us all: