Skip to content
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

new BinarySensor "Grid Status" should be BinarySensorDeviceClass = Energy #624

Closed
ChristophCaina opened this issue Jul 14, 2024 · 5 comments · Fixed by #625
Closed

new BinarySensor "Grid Status" should be BinarySensorDeviceClass = Energy #624

ChristophCaina opened this issue Jul 14, 2024 · 5 comments · Fixed by #625
Assignees
Labels
enhancement New feature or request

Comments

@ChristophCaina
Copy link

Describe the current behavior
The current BinarySensor "Grid Status" does not have a default BinarySensorDeviceClass.
You can select the deviceClass in the Entity Settings, but I think, it should be "Energy" by default.
By having a specific DeviceClass assigned, the BinarySensor can be selected as alert-class in the Area-Card, like shown in this screenshot.

image

This Icon will be shown, whenever the Sensor is "ON"

Since an alarm should be displayed whenever there's a "problem", I think the logic should be inverted - but this would be something that needs to be done from HomeAssistant.

What should be updated or changed?
The Binary Sensor "Grid Status" should have a default BinarySensorDeviceClass, preferred "Energy"

Home Assistant (please complete the following information):

  • Home Assistant Core Version: 2024.7.2
  • solaredge-modbus-multi Version: 2.4.17

Additional context
Add any other context about the request here.

@WillCodeForCats
Copy link
Owner

ENERGY is not a supported class for binary sensor.

https://developers.home-assistant.io/docs/core/entity/binary-sensor

POWER is an option though.

@WillCodeForCats WillCodeForCats self-assigned this Jul 14, 2024
@WillCodeForCats WillCodeForCats added the enhancement New feature or request label Jul 14, 2024
@WillCodeForCats WillCodeForCats linked a pull request Jul 14, 2024 that will close this issue
@ChristophCaina
Copy link
Author

Sorry, this was a translation mistake, since the deviceClass was translated as "Energy" into german ... :D

@WillCodeForCats
Copy link
Owner

Testing the PR and I will merge it as soon as I check it on my test system.

@ChristophCaina
Copy link
Author

thanks :)

I have implemented the changes, and everything seems to work.
Yet, as I have already set the deviceclass, I can't really check the difference ^^

But at least, nothing unexpected observed so far.

@WillCodeForCats
Copy link
Owner

Release v2.4.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants