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 #36 from ChristophCaina/add_sensors
Browse files Browse the repository at this point in the history

    added: system/lastRfId

    added: global/WAllChargePoints

    added: global/DailyYieldAllChargePointsKwh

    added: socFaultState (LP)

    added: socFaultStr (LP)

    added: lastRfId (LP)

    Fixed Icon: evu/DailyYieldImportKwh
  • Loading branch information
a529987659852 authored Oct 19, 2022
2 parents 55d4b70 + 0f8e936 commit 6e60c78
Showing 1 changed file with 53 additions and 2 deletions.
55 changes: 53 additions & 2 deletions custom_components/openwbmqtt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ class openWBNumberEntityDescription(NumberEntityDescription):
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:web-clock",
),
openwbSensorEntityDescription(
key="system/lastRfId",
name="zuletzt gescannter RFID-Tag",
device_class=None,
native_unit_of_measurement=None,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
icon="mdi:tag-multiple-outline",
),
openwbSensorEntityDescription(
key="global/cpuModel",
name="CPU Modell",
Expand Down Expand Up @@ -194,6 +203,23 @@ class openWBNumberEntityDescription(NumberEntityDescription):
entity_registry_enabled_default=False,
icon="mdi:home-lightning-bolt-outline",
),
openwbSensorEntityDescription(
key="global/WAllChargePoints",
name="Ladeleistung aller Ladepunkte",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=POWER_WATT,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:battery-charging-50",
),
openwbSensorEntityDescription(
key="global/DailyYieldAllChargePointsKwh",
name="Tagesverbrauch aller Ladepunkte",
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
value_fn=lambda x: round(float(x), 2),
icon="mdi:counter",
),
openwbSensorEntityDescription(
key="pv/W",
name="PV-Leistung",
Expand Down Expand Up @@ -242,7 +268,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
value_fn=lambda x: round(float(x), 2),
icon="mdi:transmission-tower-export",
icon="mdi:transmission-tower-import",
),
openwbSensorEntityDescription(
key="pv/WhCounter",
Expand Down Expand Up @@ -332,6 +358,31 @@ class openWBNumberEntityDescription(NumberEntityDescription):
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
openwbSensorEntityDescription(
key="socFaultState",
name="Soc-Fehlerstatus",
device_class=None,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
icon="mdi:alert-circle-outline",
),
openwbSensorEntityDescription(
key="socFaultStr",
name="Soc-Fehlertext",
device_class=None,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
icon="mdi:alert-circle-outline",
),
openwbSensorEntityDescription(
key="lastRfId",
name="zuletzt gescannter RFID-Tag",
device_class=None,
native_unit_of_measurement=None,
icon="mdi:tag-multiple",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
openwbSensorEntityDescription(
key="AConfigured",
name="Ladestromvorgabe",
Expand Down Expand Up @@ -387,7 +438,7 @@ class openWBNumberEntityDescription(NumberEntityDescription):
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:counter",
value_fn=lambda x: round(float(x), 1),
value_fn=lambda x: round(float(x), 2),
),
openwbSensorEntityDescription(
key="countPhasesInUse",
Expand Down

0 comments on commit 6e60c78

Please sign in to comment.