Add hive boost to climate and water_heater#26789
Conversation
…t into feature/add_boost
* dev: (42 commits) Remove default host for Plex config (home-assistant#26583) Add Obihai integration (home-assistant#26537) Add switch platform to iaqualink integration (home-assistant#26545) Fix GTFS sensor wrong timezone (home-assistant#26580) Make uk_transport sensor timezone/DST aware (home-assistant#26577) Updated frontend to 20190911.0 (home-assistant#26578) bump dependencies (home-assistant#26576) Bump UPC connect / fix auth issue (home-assistant#26570) Cleanup stale script stuff (home-assistant#26573) Improve startup of devcontainer (home-assistant#26572) Ignore test output [ci skip] Translation update deCONZ device automations (home-assistant#26366) Nuki less strict (home-assistant#26542) osram cluster (home-assistant#26555) fix events for smartthings acceleration cluster (home-assistant#26557) Fix tests Refactor Cast (home-assistant#26550) Add sensor platform to iaqualink component (home-assistant#26544) Bump geniushub-client to 0.6.13 (home-assistant#26554) ...
…t into feature/add_boost * 'feature/add_boost' of github.com:KJonline/home-assistant: Update Libary to 0.2.19
* dev: (38 commits) Fix Environment Canada weather forecast, retain icon_code sensor (home-assistant#26646) Rename MockToggleDevice to MockToggleEntity (home-assistant#26644) Refactor nzbget to support future platform changes (home-assistant#26462) deCONZ - Remove mechanisms to import a configuration from configuration.yaml (home-assistant#26648) deCONZ - battery sensor instead of battery attribute (home-assistant#26591) Add built in weather to Homematic IP Cloud (home-assistant#26642) Move deCONZ services to their own file (home-assistant#26645) Add group attribute to Homematic IP Cloud (home-assistant#26618) Add iaqualink binary sensor and unique_id (home-assistant#26616) zha ZCL color loop effect (home-assistant#26549) [ci skip] Translation update deCONZ - create deconz_events through sensor platform (home-assistant#26592) Update azure-pipelines-wheels.yml for Azure Pipelines Update azure-pipelines-wheels.yml Refactor Bluetooth Tracker to async (home-assistant#26614) Fix Typo (home-assistant#26612) [ci skip] Translation update Disable Watson TTS Telemetry (home-assistant#26253) Improve bluetooth tracker device code (home-assistant#26067) Bump zigpy-zigate to 0.3.1 (home-assistant#26600) ...
* dev: (92 commits) Bump pynws version to 0.8.1 (home-assistant#26770) Bump HAP-python to 2.6.0 for homekit (home-assistant#26783) [ci skip] Translation update Add integration scaffolding script (home-assistant#26777) Bump simplisafe-python to 5.0.1 (home-assistant#26775) Bump aiowwlln to 2.0.2 (home-assistant#26769) ZHA siren and warning device support (home-assistant#26046) Add transport data from maps.yandex.ru api (home-assistant#26766) Type hint additions (home-assistant#26765) Bump openwrt-luci-rpc to version 1.1.1 (home-assistant#26759) Revert "Add transport data from maps.yandex.ru api (home-assistant#26252)" (home-assistant#26762) [ci skip] Translation update Updated frontend to 20190919.0 deCONZ improve gateway tests (home-assistant#26709) Add transport data from maps.yandex.ru api (home-assistant#26252) Update codeowners (home-assistant#26733) Bump influxdb to 5.2.3 (home-assistant#26743) Izone component (home-assistant#24550) Bump restrictedpython to 5.0 (home-assistant#26741) Bumped version to 0.99.1 ...
|
Hi @MartinHjelmare i have updated and moved the service registration and the service handler to the component level now. i have also updated the component to pass through a list for each HA type and in turn within the platform setup iterating through that list adding the entity. I am struggling with the dispatch_connect and the handle callback. I have tried implementing it as a base class and passing it through, i have even tried implementing it directly into the platform. For some reason which ever way i try and achieve it, the platform i add it to will freeze during setup and HA will stay frozen and not report any errors. Any ideas? |
|
Hi @MartinHjelmare, I have amended post your recent comments and updated the files passing a list through to Add Entities and introducing a base class for the callback, along with the other changes. |
| self.session.core.update_data(self.node_id) | ||
| self.attributes = self.session.attributes.state_attributes(self.node_id) | ||
|
|
||
| def update(self): |
There was a problem hiding this comment.
This looks like it has been outdented too far.
|
Hi @MartinHjelmare, i have committed the latest changes following your last review. |
* dev: (87 commits) Add ecobee services to create and delete vacations (home-assistant#26923) Centralize rainbird config and add binary sensor platform (home-assistant#26393) Add config flow to transmission (home-assistant#26434) Add Plex config options support (home-assistant#26870) Bump pyobihai, add unique ID and availability (home-assistant#26922) Add mysensors codeowner (home-assistant#26917) [ci skip] Translation update Add MySensors ACK (home-assistant#26894) Remove lamps and groups from ha when removed from Hue (home-assistant#26881) Add config flow to ecobee (home-assistant#26634) deCONZ - Increase bridge discovery robustness in config flow (home-assistant#26911) Add call direction sensor for Obihai (home-assistant#26867) Bumped version to 0.99.3 HM-CC-TC was not recognized (home-assistant#26623) Add google_assistant alarm_control_panel (home-assistant#26249) deCONZ - Improve ssdp discovery by storing uuid in config entry (home-assistant#26882) Fix missing whitespace around arithmetic operator (home-assistant#26908) Fix bed_activity history chart of the Xiaomi Aqara vibration sensor (home-assistant#26875) Add voltage attribute to Xiaomi Aqara devices (home-assistant#26876) Bump ndms2-client to 0.0.9 (home-assistant#26899) ...
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
|
Hi @MartinHjelmare, i have updated moving the variables to the parent class. i have had to leave one variable in the light child class as it has an extra piece of data which is only available if the device is light. |
|
Hi @MartinHjelmare, it looks like the pylint check is failing on the platform classes that call the parent class but don’t do anything else within the initialisation process e.g binary_sensor. Where as the climate and light platform which calls the parent and assigns a variable in the child class aren’t being flagged by pylint. Any ideas? |
|
In the child classes that doesn't do anything but call the parent class init, we can remove the init method in the child class. |
| """Representation of a Hive binary sensor.""" | ||
|
|
||
| def __init__(self, hivesession, hivedevice): | ||
| def __init__(self, hive_session, hive_device): |
| """Hive Sensor Entity.""" | ||
|
|
||
| def __init__(self, hivesession, hivedevice): | ||
| def __init__(self, hive_session, hive_device): |
| """Hive Active Plug.""" | ||
|
|
||
| def __init__(self, hivesession, hivedevice): | ||
| def __init__(self, hive_session, hive_device): |
| """Hive Water Heater Device.""" | ||
|
|
||
| def __init__(self, hivesession, hivedevice): | ||
| def __init__(self, hive_session, hive_device): |
|
Hi @MartinHjelmare, apoligies i am not familiar with using super(). but when i remove the init method from the child classes i get an error advising I have updated the classes to be the below but keep getting the above error. class HiveSensorEntity(HiveEntity, Entity):
super().__init__(hive_session, hive_device)
@property
def unique_id(self):
"""Return unique ID of entity."""
return self._unique_id` |
|
Remove the whole init method including the call to |
|
Hi @MartinHjelmare, that’s seems to have passed all the checks now. I just wanted to say thanks for all your help with this. I started learning python with this component and this had been a massive learning curve. Thanks for your patience with me/this and there is still a lot for me to learn but I am looking forward to it. |
| DOMAIN = "hive" | ||
| DATA_HIVE = "data_hive" | ||
| SERVICES = ["Heating", "HotWater"] | ||
| SERVICE_BOOST_HOTWATER = "boost_hotwater" |
There was a problem hiding this comment.
Noticed during the review of the documentation: hotwater is not one word. So I expected it to be hot_water ?
Description:
Add the ability to call the boost function for the hive hot water. it will also allow a time period to be set for the climate boost by implementing a hive boost service.
Related issue (if applicable): fixes #25536
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10407
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.