diff --git a/amniotic/mqtt/control.py b/amniotic/mqtt/control.py index 22b5d47..be0fbee 100644 --- a/amniotic/mqtt/control.py +++ b/amniotic/mqtt/control.py @@ -1,13 +1,12 @@ import logging +import pip import threading from functools import cached_property -from time import sleep -from typing import Optional, Any - -import pip from johnnydep import JohnnyDist as Package from paho.mqtt import client as mqtt from pytube import YouTube, Stream +from time import sleep +from typing import Optional, Any from amniotic.audio import Amniotic from amniotic.config import NAME @@ -127,7 +126,6 @@ def data(self) -> dict: "unique_id": self.uid, "object_id": self.uid, "device": self.device.announce_data, - "device_class": self.HA_PLATFORM, "force_update": True, "payload_available": self.PAYLOAD_ONLINE, "payload_not_available": self.PAYLOAD_OFFLINE, @@ -275,23 +273,9 @@ class VolumeMaster(Volume): Home Assistant master volume control. """ - HA_PLATFORM = 'number' ICON_SUFFIX = 'volume-high' NAME = 'Master Volume' - @property - def data(self): - """ - - Home Assistant announce data for the entity. - - """ - data = super().data | { - 'min': self.MIN, - 'max': self.MAX - } - return data - def get_value(self) -> Any: return self.amniotic.volume @@ -386,17 +370,6 @@ def get_value(self) -> Any: def set_value(self, value) -> Any: pass - @property - def data(self): - """ - - Home Assistant announce data for the entity. - - """ - data = super().data - data.pop('device_class') - return data - @cached_property def update_sensor(self): """ diff --git a/amniotic/mqtt/sensor.py b/amniotic/mqtt/sensor.py index 66b6617..c037b6a 100644 --- a/amniotic/mqtt/sensor.py +++ b/amniotic/mqtt/sensor.py @@ -24,7 +24,6 @@ def topic_command(self): @property def data(self): data = super().data - data.pop('device_class') if self.UOM: data['unit_of_measurement'] = self.UOM return data diff --git a/setup.py b/setup.py index 3081eab..1cdaee3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ long_description_content_type='text/markdown', name=name, version=__version__, - url=f'https://github.com/fmtr/{name}', + url=f'https://link.frontmatter.ai/{name}', license='Copyright © 2022 Frontmatter. All rights reserved.', author='Frontmatter', description='A multi-output ambient sound mixer for Home Assistant',