Skip to content

Commit

Permalink
fix power sensors state comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
litinoveweedle committed Jun 10, 2024
1 parent d30562f commit 675ae81
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/smartir/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def _async_power_sensor_check(*_):
self._power_sensor_check_cancel = None
expected_state = self._power_sensor_check_expect
self._power_sensor_check_expect = None
current_state = self.hass.states.get(self._power_sensor)
current_state = self.hass.states.get(self._power_sensor).state
_LOGGER.debug(
"Executing power sensor check for expected state '%s', current state '%s'",
expected_state,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartir/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _async_power_sensor_check(*_):
self._power_sensor_check_cancel = None
expected_state = self._power_sensor_check_expect
self._power_sensor_check_expect = None
current_state = self.hass.states.get(self._power_sensor)
current_state = self.hass.states.get(self._power_sensor).state
_LOGGER.debug(
"Executing power sensor check for expected state '%s', current state '%s'",
expected_state,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartir/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def _async_power_sensor_check(*_):
self._power_sensor_check_cancel = None
expected_state = self._power_sensor_check_expect
self._power_sensor_check_expect = None
current_state = self.hass.states.get(self._power_sensor)
current_state = self.hass.states.get(self._power_sensor).state
_LOGGER.debug(
"Executing power sensor check for expected state '%s', current state '%s'",
expected_state,
Expand Down

0 comments on commit 675ae81

Please sign in to comment.