mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Indicate to user that remote was turned off when call was attempted (#40715)
* Indicate to user that remote was turned off when call was attempted * Catch exception in test * Switch to warning log * Apply suggestions from code review Add suggested change to loggin
This commit is contained in:
parent
acb0307beb
commit
999eeb39b9
@ -243,6 +243,9 @@ class BroadlinkRemote(RemoteEntity, RestoreEntity):
|
|||||||
delay = kwargs[ATTR_DELAY_SECS]
|
delay = kwargs[ATTR_DELAY_SECS]
|
||||||
|
|
||||||
if not self._state:
|
if not self._state:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"remote.send_command canceled: %s entity is turned off", self.entity_id
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
should_delay = False
|
should_delay = False
|
||||||
@ -285,6 +288,9 @@ class BroadlinkRemote(RemoteEntity, RestoreEntity):
|
|||||||
toggle = kwargs[ATTR_ALTERNATIVE]
|
toggle = kwargs[ATTR_ALTERNATIVE]
|
||||||
|
|
||||||
if not self._state:
|
if not self._state:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"remote.learn_command canceled: %s entity is turned off", self.entity_id
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
should_store = False
|
should_store = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user