Add water level#853
Conversation
|
i would love to have this feature in the vacuum-card |
|
@roumano the feature is ready to use and is just waiting to be accepted for merging |
|
@denysdovhan , the feature is ready, can you have a look and accept to merge ? |
|
@denysdovhan , Can we help you on this repository to review/manage merge request or ... |
denysdovhan
left a comment
There was a problem hiding this comment.
Thanks for contributing! This is a nice feature. Please address my comments and let's proceed with merging this feature.
| "home-assistant-js-websocket": "^9.2.1", | ||
| "lit": "^2.0.0", | ||
| "lodash": "^4.17.21" | ||
| "lodash": "^4.17.21", |
There was a problem hiding this comment.
As I see lodash is not used anywhere.
| return ( | ||
| this.hass && | ||
| !!this.config.water_level && | ||
| changedProps.get('hass').states[this.waterLevelEntity].state !== | ||
| this.waterLevel.state | ||
| ); |
There was a problem hiding this comment.
Doesn't hasConfigOrEntityChanged do the same thing?
There was a problem hiding this comment.
No it does not. If this is missing the waterLevel only is updated when e.g. the fan speed was changed.
There was a problem hiding this comment.
I just noticed that this behavior is exactly the same for the stats (I've included them via entity_id instead of attribute). Those are only refreshed if the page is refreshed. I think this is the reason why this workaround is necessary.
I personally think that only the values are instantly refreshed that are directly in the vacuum entity.
| ${sources.map( | ||
| (item, index) => html` | ||
| ${objects.map( | ||
| (item: string, index: number) => html` |
There was a problem hiding this comment.
TS should infer type here just fine. No need to be that specific.
There was a problem hiding this comment.
Somehow it's not:
Parameter 'item' implicitly has an 'any' type.
|
@denysdovhan sorry that it took me so long to address those comments. Now it is ready for review again. Thanks! |
|
I merged this (and all the other PRs) into a build on my repository (PR #903) while the author is inactive. Feel free to use that version! (Note that I intend for this to be temporary so that you get your contribution credit here when the time comes) |
|
Thank you @clarinetJWD , it's working as expected : |
|
This PR is stale because there hasn't been any activity for a long time. |
|
Still not merged yet. |
|
This PR is stale because there hasn't been any activity for a long time. |
|
This PR was closed because it has been stalled for 30 days with no activity. |


Add a drop down menu for the water level.
Continuation / Rebase of #412