Support for Daikin AirBase units

There exists preliminary support for Daikin AirBase in the standard Daikin climate component. Replace the appliance.py found in your pydaikin library folder (/usr/local/lib/python3.7/site-packages/pydaikin in the Docker version) with the file at: https://bitbucket.org/fredrik_e/pydaikin/src/Airbase/pydaikin/appliance.py (do note that this file @03b49e6 only supports AirBase units so it will break old behaviour).

I’m expecting to fix everything into HomeAssistant in the next days or so. If you have an AirBase unit I would highly appreciate some more testers.

2 Likes

hey fredrike, how can i do this in hassio

@Borgy, can you assist @Sam_Bonsing?

@Borgy, could you please help me out

I think @Borgy did something like Editing Component Files in Hassio.

I.e., copy everything from https://github.com/home-assistant/home-assistant/tree/main/homeassistant/components/daikin into /config/custom_components/daikin and change all refrences of

from pydaikin.appliance import Appliance

to

from custom_components.pydaikin.appliance import Appliance

and copy everything from bitbucket to /config/custom_components/pydaikin

I’ll try to get this to the official Daikin component as soon as I get hold of the maintainer of the pydaikn library.

1 Like

Hi all
@fredrike is correct - do the copy from github for dakin to local custom_components and alter all the references to the custom_components folder.
And then load up the pydaikin updates from bitbucket reference currently - and you should have success!

cheers

2 Likes

thanks for the help guys
i am now getting this error

Error while setting up platform daikin

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 124, in _async_setup_platform
task = async_create_setup_task()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 104, in async_create_setup_task
self.hass, config_entry, self._async_schedule_add_entities)
TypeError: async_setup_entry() takes 2 positional arguments but 3 were given

could you please assist if possible

I do recall seeing this one (or very similar) during our dev/test cycles on getting this working…

Have you updated all the references in /config/custom_components/daikin (i think climate.py and config_flow.py) to point to from custom_components.pydaikin.appliance import Appliance

And the appliance.py in the pydakin directory is the latest from @fredrike bitbucket?

Thanks @Borgy for your help, but ive checked this and it turns out that i have already done this. i did open sensor.py and thought maybe something needs to be changed in this first section

“”“Support for Daikin AC sensors.”""
import logging

from homeassistant.components.daikin import DOMAIN as DAIKIN_DOMAIN
from homeassistant.components.daikin.const import (
ATTR_INSIDE_TEMPERATURE, ATTR_OUTSIDE_TEMPERATURE, SENSOR_TYPE_TEMPERATURE,
SENSOR_TYPES)
from homeassistant.const import CONF_ICON, CONF_NAME, CONF_TYPE
from homeassistant.helpers.entity import Entity
from homeassistant.util.unit_system import UnitSystem

_LOGGER = logging.getLogger(name)

def setup_platform(hass, config, add_entities, discovery_info=None):
“”"Old way of setting up the Daikin sensors.

Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass

async def async_setup_entry(hass, entry, async_add_entities):
“”“Set up Daikin climate based on config_entry.”""
daikin_api = hass.data[DAIKIN_DOMAIN].get(entry.entry_id)
async_add_entities([
DaikinClimateSensor(daikin_api, sensor, hass.config.units)
for sensor in SENSOR_TYPES

is this a possiblity. or what could i be missing.

I think you might have found a new bug. It seems like you are calling this part with TypeError: async_setup_entry() takes 2 positional arguments but 3 were given.

https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/daikin/init.py#L61

I really don’t know how you managed to reach that…

@Borgy perhaps you could send @Sam_Bonsing your custom_components folder.

@fredrike
should i post any more info from my log or are you certain its a bug .

You must have missed something when you copied in the files…

do you think from your bitbucket or home assistant git

@Borgy would you be able to please

From Home-Assistant, I think it would be much easier to just change pydaikin/appliance.py in your python library folder.

@fredrike how do i do that on hassio

@fredrike how long do you think till this update will be in hassio

I don’t know, I’m running ha in a Docker container.

A couple of weeks, we will not make it to 0.90, I think the code freeze for that is on Wednesday so it have to wait until 0.91.

Perhaps you could run HA natively just for testing purpose.

@Sam_Bonsing - have reached out…

1 Like

Ok, Async support for Daikin just got merged (:crossed_fingers: will it make it through 0.90).

It would be great if someone with an AirBase unit could set up a dev-instance or Docker using the dev-tag

docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -e "TZ=America/Los_Angeles" --net=host homeassistant/home-assistant:dev

And from there replace the pydaikin/appliance.py with this appliance.py (found in /usr/local/lib/python3.7/site-packages/pydaikin in the Docker container).

1 Like