Add state_class and use SensorEntityDescription for comfoconnect#54066
Add state_class and use SensorEntityDescription for comfoconnect#54066MartinHjelmare merged 11 commits intohome-assistant:devfrom
state_class and use SensorEntityDescription for comfoconnect#54066Conversation
9ea534a to
45a3bd6
Compare
|
I have a conflict now since #48261 has been merged. Should I use |
|
I also had to modify |
| { | ||
| vol.Optional(CONF_RESOURCES, default=[]): vol.All( | ||
| cv.ensure_list, [vol.In(SENSOR_TYPES)] | ||
| cv.ensure_list, [vol.In([desc.key for desc in SENSOR_TYPES])] |
There was a problem hiding this comment.
Side note: Long term we should remove this option and just allow users to enable/disable entities as wanted via the entity registry, and we set the less important entities as disabled by default. That means the description key will change to be the sensor_id.
There was a problem hiding this comment.
I want to take a look at converting this to a config flow later, and then this will go away anyway.
|
The required changes have been made, and it's up to date with the latest Is it okay for the small change in |
|
The changes in fan have been reverted. |
|
There's a test failure. |
Sorry. I'm looking into it. |
|
Sorry for the annoying commits. I'm still waiting for tox to fully install all dependencies so I can run the tests locally. This seems to take ages. :( |
e148ff5 to
2c523b1
Compare
|
@michaelarnauts You don't necessarily need That might be helpful as well: https://developers.home-assistant.io/docs/development_testing#testing-outside-of-tox |
I tried that, but it complained about missing pool fixtures or something like that. I haven't had the time do fully dive into how home assistant runs its tests. |
|
Reverted attribute key changes, and removed breaking change from ticket. |
|
All done! |
Proposed change
state_classso the power stats work with the new energy dashboard.native_valueandnative_unit_of_measurementSensorEntityDescriptionsfor templates in this integration.Type of change
Additional information
Checklist
black --fast 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..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: