-
Notifications
You must be signed in to change notification settings - Fork 44
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
Reload integration from UI & bugfix #350
base: master
Are you sure you want to change the base?
Conversation
@gigatexel thanks for your help. But can you make one pull request for one feature. For example one only for the reload and one for removing entities and so on. I try to make branches from your pull request and cherry pick your commits. |
@gigatexel I think in the newest pyloxone this was already fixed: Entity None (<class 'custom_components.loxone.climate.LoxoneAcControl'>) implements HVACMode(s): off, auto and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/JoDehli/PyLoxone/issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigatexel
Why do you make use of the property supported_features and not use the _attr_supported_features. This should result in the same behavior I think.
In my opinion the property is only useful when you want to change the supported feature dynamically.
A small update for the integration that should make using it a lot more convenient:
init.py
async_unload_entry
to enable reloading the integrationremove_unavailable_entities
andremove_unused_devices
to avoind orphaned devices/entities when function blocks are removed in Config.api.py
Add reconnect try/catch to avoid connecting to MS after the connection was closed
climate.py
Solve this warning:
I tested this on my system and works when removing/adding function blocks in Config and then reloading the integration instead of rebooting HA.
Maybe someone else can try and test?