Comments (3)
I did some tests with changing the unit_of_measurement - and noticed, that it's looking better when it is like it is right now.
Changing the "hr" to "h" as given in the specs, would change how the Entities List will display the value...
Unfortunately, with the current Setup, the unit of measurement will not be translated, which is looking a bit weired in a translated UI...
:-(
from dreame-vacuum.
I've searched a bit deeper... and one thing isn't quite clear to me:
why does the integration use different units here?
I think, it would make sense to implement some calculation logic like:
if value > 24 hrs --> use days
else use hrs.
this is what's given in the core/const.py
TIME_MILLISECONDS: Final = "ms"
"""Deprecated: please use UnitOfTime.MILLISECONDS."""
TIME_SECONDS: Final = "s"
"""Deprecated: please use UnitOfTime.SECONDS."""
TIME_MINUTES: Final = "min"
"""Deprecated: please use UnitOfTime.MINUTES."""
TIME_HOURS: Final = "h"
"""Deprecated: please use UnitOfTime.HOURS."""
TIME_DAYS: Final = "d"
"""Deprecated: please use UnitOfTime.DAYS."""
TIME_WEEKS: Final = "w"
"""Deprecated: please use UnitOfTime.WEEKS."""
TIME_MONTHS: Final = "m"
"""Deprecated: please use UnitOfTime.MONTHS."""
TIME_YEARS: Final = "y"
"""Deprecated: please use UnitOfTime.YEARS."""
So - I think it should be possible to calculate the values not only for days and hours, but for weeks or years...
Or does the robot provide the values in days and hours?
After changing the Unit_of_measurement from "days" to "d" and "hr" to "h"
I am getting this
from dreame-vacuum.
I did some tests with changing the unit_of_measurement - and noticed, that it's looking better when it is like it is right now.
I did think the same thing and thats why this is implemented this way.
why does the integration use different units here?
All of the values directly read from the device and some values implemeted as days instead of hours on the device itself for keeping it under 16bit integer (65535). Your suggestion will result losing presicion of the values returning in hours from the device.
from dreame-vacuum.
Related Issues (20)
- Bootloop beta 2024.5 HOT 1
- Request to add Dreame Mova M1 HOT 3
- Selective Dry Vacuuming Zone without Mopping HOT 1
- L20 Ultra mop not possible when left in station HOT 6
- select.vacuum_cleaning_mode sometimes contains only 1 item : "sweeping" HOT 3
- Trouble logging in HOT 3
- Add Two Xiaomi Vaccum S10+ and S10 HOT 1
- Broken integration on HA 2024.5.0 HOT 12
- After upgrade to 2024.5.0, Dreame Vacuum integration is stalling HA startup sequence HOT 38
- 2024.5 Integration isnt working probably HOT 1
- Trigger button press from Automation throws an error HOT 15
- Send notification to phone? HOT 3
- Xiaomi x20+
- "Failed to call service" error after home asssitant 2024.5.0 HOT 9
- Dreame isn't running anymore since May 3rd HOT 1
- Failing to call service HOT 2
- Added Swedish translation to Github fork HOT 1
- Dreame x10 (firmware version 4.3.9_1551) HOT 5
- Integration broken after 2024.5 upgrade HOT 2
- Failed to call the service HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dreame-vacuum.