diff --git a/ThermIQ_Card.yaml b/ThermIQ_Card.yaml
index 06d7616..267e65b 100644
--- a/ThermIQ_Card.yaml
+++ b/ThermIQ_Card.yaml
@@ -14,18 +14,20 @@ entities:
content: >
-
+
- {% if states('sensor.thermiq_mqtt_vp1_hotwaterproduction_on')=='on' %}
+ {% if states('binary_sensor.thermiq_mqtt_vp1_hotwaterproduction_on')==true %}
{% else %}
- {% if (states('sensor.thermiq_mqtt_vp1_opt_hgw_installed')=='on') and (states('sensor.thermiq_mqtt_vp1_compressor_on')=='on') %}
+ {% if (states('binary_sensor.thermiq_mqtt_vp1_opt_hgw_installed')==true) and (states('binary_sensor.thermiq_mqtt_vp1_compressor_on')==true) %}
{% else %}
@@ -37,17 +39,21 @@ entities:
{{ states('sensor.thermiq_mqtt_vp1_boiler_t') }} C
{{ states('sensor.thermiq_mqtt_vp1_hgw_water_t') }} C
{{ states('sensor.thermiq_mqtt_vp1_supplyline_t') }} C
-
{{ states('sensor.thermiq_mqtt_vp1_supply_pump_speed') }} %
-
{{ states('sensor.thermiq_mqtt_vp1_brine_pump_speed') }} %
+
{{ states('sensor.thermiq_mqtt_vp1_supply_pump_speed') }} %
+
{{ states('sensor.thermiq_mqtt_vp1_brine_pump_speed') }} %
{{ states('sensor.thermiq_mqtt_vp1_returnline_t') }} C
{{ states('sensor.thermiq_mqtt_vp1_pressurepipe_t') }} C
-
-
-
-
-
+
+
+
+
+
EVU
+
{{ states('sensor.thermiq_mqtt_vp1_indoor_t') }} C
+
{{ states('sensor.thermiq_mqtt_vp1_outdoor_t') }} C
+
Temp
+
diff --git a/custom_components/thermiq_mqtt/binary_sensor.py b/custom_components/thermiq_mqtt/binary_sensor.py
index 8a800a3..f9af36c 100644
--- a/custom_components/thermiq_mqtt/binary_sensor.py
+++ b/custom_components/thermiq_mqtt/binary_sensor.py
@@ -13,7 +13,6 @@
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.const import (
- TEMP_CELSIUS,
PERCENTAGE
)
from .const import (
@@ -89,7 +88,7 @@ def __init__(self, hass, heatpump, device_id, vp_reg, friendly_name, bitmask):
# set HA instance attributes directly (mostly don't use property)
# self._attr_unique_id
- self.entity_id = f"sensor.{heatpump._domain}_{heatpump._id}_{device_id}"
+ self.entity_id = f"binary_sensor.{heatpump._domain}_{heatpump._id}_{device_id}"
_LOGGER.debug("entity_id:" + self.entity_id)
_LOGGER.debug("idx:" + device_id)
@@ -134,7 +133,7 @@ def should_poll(self):
@property
def state(self):
"""Return the state of the sensor."""
- return STATE_ON if self._state else STATE_OFF
+ return (self._state)
@property
def vp_reg(self):
@@ -143,7 +142,7 @@ def vp_reg(self):
@property
def is_on(self):
- return self._state is True
+ return STATE_ON if (self._state) else STATE_OFF
@property
def sorter(self):
diff --git a/custom_components/thermiq_mqtt/input_number.py b/custom_components/thermiq_mqtt/input_number.py
index e55af0c..8e8c85c 100644
--- a/custom_components/thermiq_mqtt/input_number.py
+++ b/custom_components/thermiq_mqtt/input_number.py
@@ -16,7 +16,7 @@
CONF_MODE,
CONF_NAME,
CONF_UNIT_OF_MEASUREMENT,
- TEMP_CELSIUS,
+ UnitOfTemperature.CELSIUS,
)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_platform import EntityPlatform
@@ -120,7 +120,7 @@ def create_input_number_entity(heatpump, name) -> CustomInputNumber:
]
):
icon = "mdi:temperature-celsius"
- unit = TEMP_CELSIUS
+ unit = UnitOfTemperature.CELSIUS
else:
unit = reg_id[name][2]
icon = "mdi:gauge"
diff --git a/custom_components/thermiq_mqtt/sensor.py b/custom_components/thermiq_mqtt/sensor.py
index 0d292a0..424e253 100644
--- a/custom_components/thermiq_mqtt/sensor.py
+++ b/custom_components/thermiq_mqtt/sensor.py
@@ -14,7 +14,7 @@
from homeassistant.helpers.entity import Entity, async_generate_entity_id
from homeassistant.const import (
- TEMP_CELSIUS,
+ UnitOfTemperature.CELSIUS,
PERCENTAGE
)
@@ -126,7 +126,7 @@ def __init__(
]
):
self._icon = "mdi:temperature-celsius"
- self._unit = TEMP_CELSIUS
+ self._unit = UnitOfTemperature.CELSIUS
elif vp_type in [
"sensor_boolean",
]:
@@ -142,7 +142,7 @@ def __init__(
self._idx = device_id
self._vp_reg = vp_reg
- # self.device_class [temperature, voltaage,
+ # self.device_class [temperature, voltage,
#self.state_class= measurement
# Listen for the ThermIQ rec event indicating new data