-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Switcher add current current temperature sensor #130653
Switcher add current current temperature sensor #130653
Conversation
Hey there @thecode, 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.
Temperature is already provided by the climate entity -
self._attr_current_temperature = data.temperature |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I think it is easier to work with a sensor entity rather than searching the entity's attributes, especially for using in automations. Plus, this temperature is by no means the "device's temperature" it is shows the outside temperature.. I think it makes more sense to make it its own sensor. |
Removed my accidental approval, awaiting approval from @thecode |
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
3d78b4e
to
ecd3dbe
Compare
To be honest I don't like creating sensors from climate entity since this opens a path for creating sensors for rare cases instead of templates, however since Home Assistant allows creating temperature sensor for the climate entity, mainly to allow long term statistics for this sensor I am approving this PR. Please note that future sensors for the climate entity will be rejected (I already saw a request for a binary sensor if the AC is on) Thanks |
@YogevBokobza once again I ask, please avoid constantly force pushing a branch for no reason, this has already pass tests, so no need to force push the branch |
It seems like I had to.. it was failing on something weird not related to this PR |
@thecode Failed again on this "CI / Upload test coverage to Codecov (partial suite) (pull_request)" do you know what this is and how to resolve it? |
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Proposed change
Adding a sensor for the current temperature of Thermostat Switcher devices
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: