Rename sensor.launch to sensor.launch_library (#18337)
This commit is contained in:
parent
f971309113
commit
d34c47a9e1
3 changed files with 7 additions and 7 deletions
|
@ -732,7 +732,7 @@ omit =
|
||||||
homeassistant/components/sensor/kwb.py
|
homeassistant/components/sensor/kwb.py
|
||||||
homeassistant/components/sensor/lacrosse.py
|
homeassistant/components/sensor/lacrosse.py
|
||||||
homeassistant/components/sensor/lastfm.py
|
homeassistant/components/sensor/lastfm.py
|
||||||
homeassistant/components/sensor/launch.py
|
homeassistant/components/sensor/launch_library.py
|
||||||
homeassistant/components/sensor/linky.py
|
homeassistant/components/sensor/linky.py
|
||||||
homeassistant/components/sensor/linux_battery.py
|
homeassistant/components/sensor/linux_battery.py
|
||||||
homeassistant/components/sensor/loopenergy.py
|
homeassistant/components/sensor/loopenergy.py
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
A sensor platform that give you information about the next space launch.
|
A sensor platform that give you information about the next space launch.
|
||||||
|
|
||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://www.home-assistant.io/components/sensor.launch/
|
https://www.home-assistant.io/components/sensor.launch_library/
|
||||||
"""
|
"""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
@ -21,7 +21,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
ATTRIBUTION = "Data provided by Launch Library."
|
ATTRIBUTION = "Data provided by Launch Library."
|
||||||
|
|
||||||
DEFAULT_NAME = 'Launch'
|
DEFAULT_NAME = 'Next launch'
|
||||||
|
|
||||||
SCAN_INTERVAL = timedelta(hours=1)
|
SCAN_INTERVAL = timedelta(hours=1)
|
||||||
|
|
||||||
|
@ -39,12 +39,12 @@ async def async_setup_platform(
|
||||||
|
|
||||||
session = async_get_clientsession(hass)
|
session = async_get_clientsession(hass)
|
||||||
launches = Launches(hass.loop, session)
|
launches = Launches(hass.loop, session)
|
||||||
sensor = [LaunchSensor(launches, name)]
|
sensor = [LaunchLibrarySensor(launches, name)]
|
||||||
async_add_entities(sensor, True)
|
async_add_entities(sensor, True)
|
||||||
|
|
||||||
|
|
||||||
class LaunchSensor(Entity):
|
class LaunchLibrarySensor(Entity):
|
||||||
"""Representation of a launch Sensor."""
|
"""Representation of a launch_library Sensor."""
|
||||||
|
|
||||||
def __init__(self, launches, name):
|
def __init__(self, launches, name):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
|
@ -991,7 +991,7 @@ pylacrosse==0.3.1
|
||||||
# homeassistant.components.sensor.lastfm
|
# homeassistant.components.sensor.lastfm
|
||||||
pylast==2.4.0
|
pylast==2.4.0
|
||||||
|
|
||||||
# homeassistant.components.sensor.launch
|
# homeassistant.components.sensor.launch_library
|
||||||
pylaunches==0.1.2
|
pylaunches==0.1.2
|
||||||
|
|
||||||
# homeassistant.components.media_player.lg_netcast
|
# homeassistant.components.media_player.lg_netcast
|
||||||
|
|
Loading…
Add table
Reference in a new issue