Move power and energy attributes to sensors for SmartThings Air conditioner#72594
Conversation
|
Hey there @andrewsayre, mind taking a look at this pull request as it has been labeled with an integration ( |
|
Anyone to review my PR :) Note: this PR needs the breaking change label |
|
I see them being removed as attributes but I don't see the code to add them as sensors? |
Hi @balloob! Thanks for reviewing. First, devices are polled to get their This code gets capabilities based on a fixed platform order: The first platform to be tested is CLIMATE. And in the current code, the By removing this line and so the capability from the CLIMATE platform, it will then be matched by the SENSOR platform: and these power sensors will be then added to HA here: like any other smartthings device that has the power consumption report capability. I hope that my explanation is clear :) |
emontnemery
left a comment
There was a problem hiding this comment.
LGTM, thanks @mbo18 👍

Breaking change
The following power attributes:
from the climate entity for Smartthings Air Conditioner have been removed and added as separate sensors. Please update your templates, automation and any other configuration accordingly.
Proposed change
Move power and energy attributes from the climate entity for Smarttings Air Conditioner to separate sensors like it is done for other Smartthings devices (refrigerator for example)
These sensors can now be used directly in the Energy dashboard without the need for templates sensors.
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: