Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #35 from ChristophCaina/ChristophCaina-patch-1
Browse files Browse the repository at this point in the history
Christoph caina patch 1
  • Loading branch information
a529987659852 authored Oct 11, 2022
2 parents 28a926e + c546d25 commit 55d4b70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/openwbmqtt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x) / 1000.0, 1),
value_fn=lambda x: round(float(x) / 1000.0, 2),
icon="mdi:transmission-tower-import",
),
openwbSensorEntityDescription(
Expand All @@ -221,7 +221,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x) / 1000.0, 1),
value_fn=lambda x: round(float(x) / 1000.0, 2),
icon="mdi:transmission-tower-export",
),
openwbSensorEntityDescription(
Expand Down Expand Up @@ -251,7 +251,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
value_fn=lambda x: round(float(x) / 1000.0, 2),
icon="mdi:counter",
),
# Housebattery
Expand All @@ -262,7 +262,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
value_fn=lambda x: round(float(x) / 1000.0, 2),
icon="mdi:battery-arrow-down-outline",
),
openwbSensorEntityDescription(
Expand All @@ -272,7 +272,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
value_fn=lambda x: round(float(x) / 1000.0, 2),
icon="mdi:battery-arrow-up-outline",
),
openwbSensorEntityDescription(
Expand Down

0 comments on commit 55d4b70

Please sign in to comment.