Skip to content

Commit

Permalink
Remove unused class
Browse files Browse the repository at this point in the history
Now that we compute COP from mqtt message directly, we don't need to
import all template related stuff
  • Loading branch information
kamaradclimber committed Oct 8, 2023
1 parent 71ca9bc commit a352c78
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions custom_components/aquarea/sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Support for HeishaMon controlled heatpumps through MQTT."""
from __future__ import annotations
from string import Template
import logging
from typing import Any, Optional
from dataclasses import dataclass
Expand All @@ -13,9 +12,7 @@
SensorDeviceClass,
SensorEntityDescription,
)
from homeassistant.components.template.sensor import SensorTemplate
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers import template as template_helper
from homeassistant.const import (
CONF_NAME,
CONF_STATE,
Expand All @@ -24,12 +21,6 @@
)

_LOGGER = logging.getLogger(__name__)
try:
from homeassistant.helpers.trigger_template_entity import CONF_AVAILABILITY
except:
# TODO(kamaradclimber): remove this once we stop support 2023.8 and below
_LOGGER.warn("backward compatibility mode: please update to HA 2023.9 eventually")
from homeassistant.helpers.template_entity import CONF_AVAILABILITY

from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
Expand Down Expand Up @@ -209,24 +200,6 @@ def device_info(self):
return build_device_info(DeviceType.HEATPUMP, self.discovery_prefix)


class HeishaMonSensorTemplate(SensorTemplate):
def __init__(
self,
hass: HomeAssistant,
config: dict[str, Any],
unique_id: Optional[str],
config_entry: ConfigEntry,
):
super().__init__(hass=hass, config=config, unique_id=unique_id)
self.discovery_prefix = config_entry.data[
"discovery_prefix"
] # TODO: handle migration of entities

@property
def device_info(self):
return build_device_info(DeviceType.HEATPUMP, self.discovery_prefix)


class S0Detector(SensorEntity):
def __init__(
self,
Expand Down

0 comments on commit a352c78

Please sign in to comment.