mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-09 02:16:29 +00:00
Adjust documentation for entity service registration (#916)
This commit is contained in:
parent
25d4306af3
commit
a6058d8c4a
@ -106,7 +106,7 @@ from homeassistant.helpers import config_validation as cv, entity_platform, serv
|
|||||||
async def async_setup_entry(hass, entry):
|
async def async_setup_entry(hass, entry):
|
||||||
"""Set up the media player platform for Sonos."""
|
"""Set up the media player platform for Sonos."""
|
||||||
|
|
||||||
platform = entity_platform.current_platform.get()
|
platform = entity_platform.async_get_current_platform()
|
||||||
|
|
||||||
# This will call Entity.set_sleep_timer(sleep_time=VALUE)
|
# This will call Entity.set_sleep_timer(sleep_time=VALUE)
|
||||||
platform.async_register_entity_service(
|
platform.async_register_entity_service(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user