Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hub entities (including NTP, DST, TimeZone) #221

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

ocrease
Copy link
Collaborator

@ocrease ocrease commented Dec 3, 2024

This PR introduces the concept of Hub entities. These are entities at the hub device level (we were already creating a device for the hub, but it had no entities).

image

I have added the following for now:

  • DST Rule - This controls whether Auto DST is applied and which zone to use. Only UK, EU and NZ are supported by Heatmiser. Alternatively it can be Off or ON which means DST is permanently off or on (eg +1)
  • NTP - This is a switch to report and control the status of the NTP functionality in the hub. Note that I removed the hack to always turn on NTP when the integration is loaded. If users suffer from NTP randomly turning off they can create an automation to turn it on (equally if users don't want to use NTP for whatever reason, they are not forced to)
  • TimeZone - This can be used to set the timezone of the hub. I took the offsets from Wikipedia. Note that this is separate from the DST rules (EU has multiple timezones for example).

I have also added an Identify button (which flashes the link LED on the hub) and a couple of diagnostic sensors to detect if DST is actually on and to report the ZigBee channel. It is technically possible to change the zigbee channel via the API, but that has the potential to break things so I haven't implemented logic to change it.

The NTP/DST/TimeZone changes should go a long way to satisfying the needs in #46

In the future we can add things like away/holiday mode to the hub, but the API needs changes to support it

@MindrustUK MindrustUK merged commit 4545bf2 into MindrustUK:dev Dec 6, 2024
2 checks passed
@ocrease ocrease deleted the HubEntities branch December 6, 2024 21:49
@PhillyGilly
Copy link
Contributor

Looks good in v3.0.0-beta.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants