Skip to content

Commit

Permalink
refactor: control default entities display resolution (#249)
Browse files Browse the repository at this point in the history
* Control default entities display resolution.

* Reverting version to original.

---------

Co-authored-by: Thomas Schiex <thomas.schiex@free.fr>
  • Loading branch information
tschiex and toulbar2 authored Aug 17, 2023
1 parent 991aec4 commit faf5339
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/openevse/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
icon="mdi:camera-timer",
native_unit_of_measurement=TIME_MINUTES,
entity_category=EntityCategory.DIAGNOSTIC,
suggested_display_precision=1,
),
"ambient_temperature": SensorEntityDescription(
key="ambient_temperature",
Expand Down Expand Up @@ -117,13 +118,15 @@
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=1,
),
"usage_total": SensorEntityDescription(
key="usage_total",
name="Total Usage",
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=1,
),
"openevse_firmware": SensorEntityDescription(
key="openevse_firmware",
Expand All @@ -145,6 +148,7 @@
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.VOLTAGE,
suggested_display_precision=1,
),
"charging_current": SensorEntityDescription(
key="charging_current",
Expand All @@ -153,6 +157,7 @@
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
suggested_display_precision=1,
),
"service_level": SensorEntityDescription(
key="service_level",
Expand Down Expand Up @@ -197,6 +202,7 @@
native_unit_of_measurement=POWER_WATT,
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
),
"wifi_signal": SensorEntityDescription(
key="wifi_signal",
Expand Down Expand Up @@ -225,6 +231,7 @@
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
suggested_display_precision=1,
),
"smoothed_available_current": SensorEntityDescription(
name="PV Smoothed Available Current",
Expand All @@ -233,6 +240,7 @@
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.CURRENT,
suggested_display_precision=1,
),
"charge_rate": SensorEntityDescription(
name="PV Charge Rate",
Expand Down

0 comments on commit faf5339

Please sign in to comment.