Add switch platform to goalzero (#48612)

* Add switch platform to goalzero

* fix update interval

* Apply some suggested changes

* pass device class to parent

* Drop passing device_class

* Tweaks

* Drop underscore prefix
This commit is contained in:
tkdrob 2021-04-28 15:24:56 -04:00 committed by GitHub
parent 2908332a4e
commit 74f95ac338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 107 additions and 12 deletions

View file

@ -28,7 +28,14 @@ async def async_setup_entry(hass, entry, async_add_entities):
class YetiBinarySensor(YetiEntity, BinarySensorEntity):
"""Representation of a Goal Zero Yeti sensor."""
def __init__(self, api, coordinator, name, sensor_name, server_unique_id):
def __init__(
self,
api,
coordinator,
name,
sensor_name,
server_unique_id,
):
"""Initialize a Goal Zero Yeti sensor."""
super().__init__(api, coordinator, name, server_unique_id)