Skip to content

Add setting to enable if entity is to be checked on startup#218

Merged
sveinse merged 4 commits intocustom-components:masterfrom
sveinse:feature-fix-entity-available-startup
Jul 23, 2025
Merged

Add setting to enable if entity is to be checked on startup#218
sveinse merged 4 commits intocustom-components:masterfrom
sveinse:feature-fix-entity-available-startup

Conversation

@sveinse
Copy link
Collaborator

@sveinse sveinse commented Jul 22, 2025

It turns out that some Zaptec attributes are not always present from Zaptec. An example is "total_charge_power_session". The recommendation from HA is to not add entities that aren't available, but we have to circumvent that in this case. Instead a setting have been added so it can be later turned on if wanted.

Fixes #217

@sveinse sveinse added this to the v0.8 milestone Jul 22, 2025
@sveinse
Copy link
Collaborator Author

sveinse commented Jul 23, 2025

@steinmn I updated according to your comments, and I think this looks better now.

There is one remaining item I'd like to add. There is a guideline in HA that errors and warnings should not be produced when it's expected, so I need to change it to not log as warning or error when it an entity we know can go away.

Copy link
Contributor

@steinmn steinmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Should we add something in the readme on this? Or is it more an instruction we include with the beta?

@sveinse
Copy link
Collaborator Author

sveinse commented Jul 23, 2025

@steinmn Now this is ready. It makes a info note in the logs when an attribute becomes available and when it becomes unavailable according to https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/log-when-unavailable

@sveinse sveinse merged commit 1468b5d into custom-components:master Jul 23, 2025
1 check passed
@sveinse sveinse deleted the feature-fix-entity-available-startup branch July 23, 2025 19:49
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.

Entities won't get added if they miss from Zaptec

2 participants