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

Clean removal of entities #74

Merged
merged 21 commits into from
Oct 29, 2020
Merged

Clean removal of entities #74

merged 21 commits into from
Oct 29, 2020

Conversation

astrandb
Copy link
Collaborator

Improved handling of the unselecting of entities and the following cleanup.

I cannot verify that it works for eq-sensors since I don't have access to an Equalizer.

@olalid
Copy link
Collaborator

olalid commented Oct 23, 2020

For me, the binary_sensors did not get created directly after the update, I had to change the settings to remove one binary_sensor and add it again. Or that was what I did at least to make it work again.

I also get an error when the equalizer status sensor is updated:
2020-10-23 08:27:53 DEBUG (MainThread) [custom_components.easee.sensor] EqualizerEntity async_update : QH000273 status
2020-10-23 08:27:53 INFO (MainThread) [homeassistant.components.automation.elbil_trigger] Elbil Trigger: Running automation actions
2020-10-23 08:27:53 INFO (MainThread) [homeassistant.components.automation.elbil_trigger] Elbil Trigger: Executing step call service
2020-10-23 08:27:53 INFO (MainThread) [homeassistant.components.automation.elbil_trigger] Elbil Trigger: Executing step delay 0:00:01
2020-10-23 08:27:53 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/var/opt/homeassistant/custom_components/easee/controller.py", line 264, in refresh_sites_state
self.update_ha_state()
File "/var/opt/homeassistant/custom_components/easee/controller.py", line 182, in update_ha_state
entity.async_schedule_update_ha_state(True)
File "/var/opt/homeassistant/havenv/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 438, in async_schedule_update_ha_state
assert self.hass is not None
AssertionError

Sorry I do not have time right now to dig deeper.

@astrandb
Copy link
Collaborator Author

@olalid I can't reproduce the issue with binary_sensor. Greatful if you can pinpoint when it happens. Unfortunately it is difficult do debug equalizer related problem when you haven't got one.

@olalid
Copy link
Collaborator

olalid commented Oct 23, 2020

Yes, I understand that it is difficult to understand with the limited info I provided.

Copy link
Collaborator

@olalid olalid left a comment

Choose a reason for hiding this comment

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

Great job @astrandb

@olalid
Copy link
Collaborator

olalid commented Oct 23, 2020

@olalid I can't reproduce the issue with binary_sensor. Greatful if you can pinpoint when it happens. Unfortunately it is difficult do debug equalizer related problem when you haven't got one.

Problem solved.

@olalid
Copy link
Collaborator

olalid commented Oct 24, 2020

Hold on, I just discovered that the removal of equalizer sensors does not work for some reason. Investigating...

@olalid
Copy link
Collaborator

olalid commented Oct 24, 2020

I fixed the equalizer removal bugs and merged to this branch.

Copy link
Collaborator Author

@astrandb astrandb left a comment

Choose a reason for hiding this comment

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

Looks good

@astrandb
Copy link
Collaborator Author

@olalid I don't know what happened when you added your fix. Suddenly this PR contains some 15 commits from you that seem to be old and irrelevant here. The resulting code is OK but I suggest that you check so you base your changes on correct branch.

@fondberg @tmjo I think this PR is as good as it gets for now. I should be squashed & merged.

@olalid
Copy link
Collaborator

olalid commented Oct 27, 2020

@olalid I don't know what happened when you added your fix. Suddenly this PR contains some 15 commits from you that seem to be old and irrelevant here. The resulting code is OK but I suggest that you check so you base your changes on correct branch.

@fondberg @tmjo I think this PR is as good as it gets for now. I should be squashed & merged.

Yeah, I am not a git guru, so I messed up a bit I guess.

@astrandb astrandb merged commit 48db981 into master Oct 29, 2020
@astrandb astrandb deleted the astrandb-WIP branch October 29, 2020 14:26
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.

2 participants