Adjust documentation for entity service registration (#916)

This commit is contained in:
Franck Nijhof 2021-05-03 17:25:17 +02:00 committed by GitHub
parent 25d4306af3
commit a6058d8c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ from homeassistant.helpers import config_validation as cv, entity_platform, serv
async def async_setup_entry(hass, entry):
"""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)
platform.async_register_entity_service(