Update syntax (#14812)

This commit is contained in:
Fabian Affolter 2018-06-04 14:44:55 +02:00 committed by Martin Hjelmare
parent 1d23f7f900
commit bd1b1a9ff9

View File

@ -4,7 +4,6 @@ Support for tracking the moon phases.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.moon/
"""
import asyncio
import logging
import voluptuous as vol
@ -26,8 +25,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
})
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
async def async_setup_platform(
hass, config, async_add_devices, discovery_info=None):
"""Set up the Moon sensor."""
name = config.get(CONF_NAME)
@ -71,8 +70,7 @@ class MoonSensor(Entity):
"""Icon to use in the frontend, if any."""
return ICON
@asyncio.coroutine
def async_update(self):
async def async_update(self):
"""Get the time and updates the states."""
from astral import Astral