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

🐛 Set initial state later in the process #129

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Conversation

kamaradclimber
Copy link
Owner

We cannot set native value in entity constructor because the entity has not been added to its platform yet.
It leads to:

Entity number.panasonic_heat_pump_main_fakedemandcontrol (<class 'custom_components.aquarea.number.HeishaMonMQTTNumber'>) does not have a platform, this may be caused by adding it manually instead of with an EntityComponent helper, please report it to the custom integration author

Solution is to set the value in the entity added to hass callback

This is a partial fix for #127

We cannot set native value in entity constructor because the entity has
not been added to its platform yet.
It leads to:
> Entity number.panasonic_heat_pump_main_fakedemandcontrol (<class 'custom_components.aquarea.number.HeishaMonMQTTNumber'>) does not have a platform, this may be caused by adding it manually instead of with an EntityComponent helper, please report it to the custom integration author

Solution is to set the value in the entity added to hass callback

This is a partial fix for #127
@kamaradclimber kamaradclimber merged commit 5a0a050 into main Oct 13, 2023
2 checks passed
@kamaradclimber kamaradclimber deleted the fix127_partial branch October 13, 2023 08:07
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.

1 participant