Add Binary Sensor for WeMo Insight & Maker (#55000)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Eric Severance 2021-08-22 11:09:22 -07:00 committed by GitHub
parent 2d34ebc506
commit e6ba3b41cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 247 additions and 96 deletions

View file

@ -45,14 +45,14 @@ class InsightSensor(WemoEntity, SensorEntity):
"""Common base for WeMo Insight power sensors."""
@property
def name(self) -> str:
def name_suffix(self) -> str:
"""Return the name of the entity if any."""
return f"{super().name} {self.entity_description.name}"
return self.entity_description.name
@property
def unique_id(self) -> str:
def unique_id_suffix(self) -> str:
"""Return the id of this entity."""
return f"{super().unique_id}_{self.entity_description.key}"
return self.entity_description.key
@property
def available(self) -> str: