RobertD502 / home-assistant-flair

Custom component for Home Assistant Core for Flair pucks, vents, rooms, structures, and minisplits
MIT License
87 stars 12 forks source link

New devices are not added to Home Assistant #43

Closed jfroy closed 1 year ago

jfroy commented 1 year ago

Home Assistant 2022.11.5 Supervisor 2022.11.2 Operating System 9.3 Flair integration 0.1.6 (installed via HACS)

I recently added a new vent to my Flair system and it never appeared in HA after a few days. I had to delete and re-add the integration.

RobertD502 commented 1 year ago

If new devices are added it will require either a restart of Home Assistant or selecting "Reload" for the integration. Did you do any of this?

I was unable to reproduce the issue.

jfroy commented 1 year ago

I did in fact try both of those. I plan on adding another in the next few days. I'll keep this open and see if I can repro. Any recommendation for log level that would be useful? Just set the integration python module to debug?

RobertD502 commented 1 year ago

Add this line at line 34 in the cover.py file: LOGGER.error(coordinator.data.structures[structure_id].vents) - I'm choosing error in case you have your HA default logging level set to something higher.

Restart Home Assistant. You should then see an error logged that contains all the vents returned by Flair's servers. After that, add the new vent that you plan to add using Flair's app. Once that is done, go to the Home Assistant Integrations page and reload the Flair integration. In your logs, you will see the Flair integration log an error that once again contains all of the vents returned by Flair's servers. Compare it to the initial log to see if Flair's servers are returning the new vent that you just added.

Once you're done, you can go ahead and remove the line that you added to the cover.py file.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.