mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
committed by
Paulus Schoutsen
parent
3a386e627e
commit
161c368c9d
@@ -1,8 +1,4 @@
|
||||
"""Support for MyChevy sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/binary_sensor.mychevy/
|
||||
"""
|
||||
"""Support for MyChevy binary sensors."""
|
||||
import logging
|
||||
|
||||
from homeassistant.components.mychevy import (
|
||||
@@ -20,8 +16,8 @@ SENSORS = [
|
||||
]
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities,
|
||||
discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the MyChevy sensors."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
@@ -41,7 +37,6 @@ class EVBinarySensor(BinarySensorDevice):
|
||||
The only real difference between sensors is which units and what
|
||||
attribute from the car object they are returning. All logic can be
|
||||
built with just setting subclass attributes.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, connection, config, car_vid):
|
||||
@@ -53,9 +48,8 @@ class EVBinarySensor(BinarySensorDevice):
|
||||
self._is_on = None
|
||||
self._car_vid = car_vid
|
||||
self.entity_id = ENTITY_ID_FORMAT.format(
|
||||
'{}_{}_{}'.format(MYCHEVY_DOMAIN,
|
||||
slugify(self._car.name),
|
||||
slugify(self._name)))
|
||||
'{}_{}_{}'.format(
|
||||
MYCHEVY_DOMAIN, slugify(self._car.name), slugify(self._name)))
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
||||
Reference in New Issue
Block a user