Support for Daikin AirBase units


#1

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.


Daikin Component - no climate entities created - task exception
#2

hey fredrike, how can i do this in hassio


#3

@Borgy, can you assist @Sam_Bonsing?


#4

@Borgy, could you please help me out


#5

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.


#6

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


#7

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


#8

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?


#9

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.


#10

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.


#11

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


#12

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


#13

do you think from your bitbucket or home assistant git


#14

@Borgy would you be able to please


#15

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


#16

@fredrike how do i do that on hassio


#17

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


#18

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.


#19

@Sam_Bonsing - have reached out…


#20

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).