You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of problem:
When invoking the service media_player.turn_on and passing an entity_id: all, platforms that do not support turn_on will raise a NotImplementedError in the logs. This is also true of media_player.turn_off.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
# Anywhere the service is called, such as an animation action:action:
- data:
entity_id: allservice: media_player.turn_off
Traceback (if applicable):
Error while executing automation automation.turn_off_devices_when_no_one_is_home. Unknown error for call_service at pos 3:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/automation/__init__.py", line 380, in action
await script_obj.async_run(variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 88, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/helpers/entity_component.py", line 188, in handle_service
self._platforms.values(), func, call, service_name
File "/usr/src/app/homeassistant/helpers/service.py", line 314, in entity_service_call
future.result() # pop exception if have
File "/usr/src/app/homeassistant/helpers/service.py", line 328, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/helpers/entity.py", line 477, in turn_off
raise NotImplementedError()
NotImplementedError
Additional information:
Platforms of the media_player component do not have to support turn_on and turn_off as not all devices have these capabilities (i.e. Roku). Support for these services are reflected in the state attribute supported_features represented by the constants SUPPORT_TURN_ON and SUPPORT_TURN_OFF.
Services should consider supported_features and only raise NotImplementedError if support was indicated and the method was not implemented.
The text was updated successfully, but these errors were encountered:
Home Assistant release with the issue: 0.91.0
Last working Home Assistant release (if known): None
Operating environment (Hass.io/Docker/Windows/etc.): Docker and venv
Component/platform: media_player
Description of problem:
When invoking the service
media_player.turn_on
and passing anentity_id: all
, platforms that do not supportturn_on
will raise aNotImplementedError
in the logs. This is also true ofmedia_player.turn_off
.Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
Platforms of the
media_player
component do not have to supportturn_on
andturn_off
as not all devices have these capabilities (i.e. Roku). Support for these services are reflected in the state attributesupported_features
represented by the constantsSUPPORT_TURN_ON
andSUPPORT_TURN_OFF
.Services should consider
supported_features
and only raiseNotImplementedError
if support was indicated and the method was not implemented.The text was updated successfully, but these errors were encountered: