-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Fix units to cwysj pixi fountain #146599
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
base: dev
Are you sure you want to change the base?
Fix units to cwysj pixi fountain #146599
Conversation
Hey there @tuya, @zlinoliver, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See review comment on the code.
@@ -314,25 +314,29 @@ class TuyaSensorEntityDescription(SensorEntityDescription): | |||
device_class=SensorDeviceClass.DURATION, | |||
state_class=SensorStateClass.MEASUREMENT, | |||
entity_registry_enabled_default=False, | |||
native_unit_of_measurement=UnitOfTime.SECONDS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forcing the unit of measurement in Tuya in general isn't correct. The units are supposed to be provided by the API.
Forcing this, maybe break it for others.
Is there something else wrong? Can you share the diagnostics for your device?
../Frenck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I create an issue for it or what do you suggest? Is this a bug or something missing for the configuration of the device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Frenck - it sounds like a bug on the device, not on the integration.
You may need to create a separate template entity to "fix" the value.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
@FredrikM97 could you test latest dev + #148596 and see if that fixes your issue? |
@FredrikM97 #148596 has been accepted and merged. |
@epenet Thank you. Will review it tomorrow. |
Proposed change
The units for these sensors are currently set to minutes, but there is no option to change them to hours or days. For example, a filter that lasts about 30 days is shown as 42,786 minutes, which is difficult to interpret at a glance.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: