Skip to content

Power usage entities & dynamic data updating

Choose a tag to compare

@RicArch97 RicArch97 released this 19 Nov 19:24
· 46 commits to master since this release
6583b28

The big update for the Crownstone Home Assistant integration is finally here!

Dependency updates

crownstone-lib-python-cloud (1.2.1 -> 1.4.3)

  • Added support for multiple logins
  • Improved switch command for more consistent switching of multiple Crownstones using the cloud
  • Bumped aiohttp to version 3.6.2
  • Bug fixes & structure improvements

crownstone-lib-python-sse (1.2.0 -> 1.2.5)

  • Updated ping event that caused previous version to break
  • Added support for coroutines in the event bus
  • Updated command event to now receive events to switch multiple Crownstones
  • Bumped aiohttp to version 3.6.2
  • Code improvements & bug fixes

crownstone-lib-python-uart (0.7.5 -> 0.7.7)

  • Updated crownstone-lib-python-core dependency to 0.5.8, small bug fixes

Integration

Structure

  • All data update callbacks are now located in a separate file
  • Created devices file with base classes for the devices

Entities

  • All entities now have an update callback to update their attributes
  • Power usage entities are now added to all Crownstone devices

Crownstone entities

  • Removed assumed state property, entities will show switches instead of lightning bolt buttons
  • All Crownstone entities now have device state attributes showing the switch method & which abilities are enabled or disabled

Data updating

  • Added state reporting. When switching from the app, the new state will be updated in Home Assistant. When using Switchcraft the state will only be updated in Home Assistant when using the Crownstone USB Dongle.
  • Fixed bug where users would still remain in their last room when leaving the Sphere (house)
  • Fixed bug where the config entry was reloaded for all abilities. It now only reloads when changing the dimming ability
  • Added functionality to automatically add or remove Crownstones/Locations from Home Assistant when they were added or removed from the Crownstone app. This will happen instantly and not require a restart or reload
  • Added functionality to instantly update Crownstone/Location/User names in Home Assistant when they were updated in the Crownstone app
  • Added power usage streaming. There will be new values for each Crownstone every minute

Device triggers

  • Made sure presence triggers are only displayed for presence sensors

Known issues

  • Creating multiple config entries for Crownstone is not possible yet for now. There are some challenges around unique id creation and the usage of the Crownstone USB, which can only support one config entry at the time