fix mopar sensor#9389
Conversation
| self.vehicles = [] | ||
| self.vhrs = {} | ||
| self.tow_guides = {} | ||
| seld.update() |
|
The data instance update method should be called once in the entity instance update method before the entity is added to home assistant, cause |
| self.vehicles = [] | ||
| self.vhrs = {} | ||
| self.tow_guides = {} | ||
| self.update() |
There was a problem hiding this comment.
By passing True as second argument to add_devices, Home Assistant will call update() before adding it to Home Assistant. So I'm not 100% sure how this can fix it 🤔
There was a problem hiding this comment.
(I do believe you if you say that it fixes it, I just don't understand how)
|
@MartinHjelmare @balloob This is the |
|
Yes, but the |
|
@MartinHjelmare The entity can't exist in the first place unless |
|
That was the missing piece of my puzzle. Thanks @happyleavesaoc! So another approach would be to call But I think your fix is good. 👍 |
Description:
moparsensor was DOA due to 85c98fb. As far as I understand@Throttle, we still have to callupdate()initially. Also took this opportunity to bump the dependency version to fix a cosmetic bug.Related issue (if applicable): fixes #9373
Checklist:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby running