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

Respect ESPHome ClimateTrait supports_current_temperature #132149

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Respect ESPHome ClimateTrait supports_current_temperature
  • Loading branch information
Omniflux committed Dec 3, 2024
commit 21deefe57d34707ffea034f602f9a6be753db1e4
2 changes: 2 additions & 0 deletions homeassistant/components/esphome/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@
@esphome_float_state_property
def current_temperature(self) -> float | None:
"""Return the current temperature."""
if not self._static_info.supports_current_temperature:
return None

Check warning on line 235 in homeassistant/components/esphome/climate.py

View check run for this annotation

Codecov / codecov/patch

homeassistant/components/esphome/climate.py#L235

Added line #L235 was not covered by tests
return self._state.current_temperature

@property
Expand Down
Loading