Thank Syx for those encouraging words. I took another look fresh this morning, and I think I have something.
Here is the new version of what I have, it will replace my previous components, the configuration file for adding the components is different to before, but any group configuration is the same as before, and it will maintain history.
As this version is one integrated platform and not two individual customcomponents, it is quicker when starting up HASS, it is kinder on the overall CPU usage and there are less API calls as it makes only 1 API call for all.
To setup:
- Copy the hive.yaml (44.5 KB) file to “/custom_components/hive.py” taking care to change the file name from hive.yaml to hive.py
- Copy the hive_climate.yaml (4.8 KB) file to “/custom_components/climate/hive.py” taking care to change the file name from hive_climate.yaml to hive.py
- Copy the hive_sensor.yaml (10.1 KB) file to “/custom_components/sensor/hive.py” taking care to change the file name from hive_sensor.yaml to hive.py
- Remove from configuration.yaml any sensor or climate setup for my previous version
- Add the following to configuration.yaml to setup the new version
hive:
username: YourHiveUserName
password: YourHivePassword
minutes_between_updates: 2
devices:
- hive_heating
- hive_hotwater
- hive_thermostat_batterylevel
- hive_heating_currenttemperature
- hive_heating_targettemperature
- hive_heating_state
- hive_heating_mode
- hive_heating_boost
- hive_hotwater_mode
- hive_hotwater_state
- hive_hotwater_boost
As before, minutes_between_updates: is optional and actually does not work at the moment, it will always set 2 minutes between updates.
Also the devices: section is optional, if you do not add this it will add all devices it detects. if you add this to the config, then specify which devices you would like added
I have added all devices and then added to them all to a group as below :
HiveHeating:
name: Hive Heating
entities:
- sensor.hive_heating_mode
- sensor.hive_heating_boost
- sensor.hive_heating_state
- sensor.hive_hot_water_mode
- sensor.hive_hot_water_boost
- sensor.hive_hot_water_state
- sensor.hive_target_temperature
- sensor.hive_current_temperature
- sensor.hive_thermostat_battery_level
- climate.hive_heating
- climate.hive_hotwater
Once setup it should look like this:
At the moment the hotwater is set as a climate device, but as GreenTurtwig suggested it would probably be better as an input_select. I don’t know what component type that is, but I can work with GreenTurtwig to get that changed (If you are ok with that GreenTurtwig?)
Plus this is running from the same API as before, and not the new one that GreenTurtwig’s customcomponent is running from.
If anyone has other Hive devices such as lights, plugs, motion sensors, then hopefully working with GreenTurtwig we can update this platform to get them added
I hope this version works for those that are interested, please let me know either way if it works or not, it would be really great to know.