diff --git a/ThermIQ_Card.yaml b/ThermIQ_Card.yaml index 267e65b..da662ac 100644 --- a/ThermIQ_Card.yaml +++ b/ThermIQ_Card.yaml @@ -22,12 +22,12 @@ entities: @keyframes blink { to {visibility: hidden;}} -
+
- {% if states('binary_sensor.thermiq_mqtt_vp1_hotwaterproduction_on')==true %} + {% if states('binary_sensor.thermiq_mqtt_vp1_hotwaterproduction_on')=='True' %}
vp missing
{% else %} - {% if (states('binary_sensor.thermiq_mqtt_vp1_opt_hgw_installed')==true) and (states('binary_sensor.thermiq_mqtt_vp1_compressor_on')==true) %} + {% if (states('binary_sensor.thermiq_mqtt_vp1_opt_hgw_installed')=='True') and (states('binary_sensor.thermiq_mqtt_vp1_compressor_on')=='True') %}
vp missing
{% else %}
vp missing
@@ -39,14 +39,14 @@ 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
diff --git a/custom_components/thermiq_mqtt/binary_sensor.py b/custom_components/thermiq_mqtt/binary_sensor.py index f9af36c..cc88e5a 100644 --- a/custom_components/thermiq_mqtt/binary_sensor.py +++ b/custom_components/thermiq_mqtt/binary_sensor.py @@ -133,7 +133,7 @@ def should_poll(self): @property def state(self): """Return the state of the sensor.""" - return (self._state) + return True if (self._state) else False @property def vp_reg(self): diff --git a/custom_components/thermiq_mqtt/input_number.py b/custom_components/thermiq_mqtt/input_number.py index 8e8c85c..e55af0c 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, - UnitOfTemperature.CELSIUS, + TEMP_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 = UnitOfTemperature.CELSIUS + unit = TEMP_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 424e253..eeb924e 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 ( - UnitOfTemperature.CELSIUS, + TEMP_CELSIUS, PERCENTAGE ) @@ -126,7 +126,7 @@ def __init__( ] ): self._icon = "mdi:temperature-celsius" - self._unit = UnitOfTemperature.CELSIUS + self._unit =TEMP_CELSIUS elif vp_type in [ "sensor_boolean", ]: