mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Correct decimals in Growatt energy reporting (#4277)
fixes https://github.com/esphome/issues/issues/3888
This commit is contained in:
parent
75dff1e102
commit
b1f1329cee
1 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ GrowattSolar = growatt_solar_ns.class_(
|
|||
PHASE_SENSORS = {
|
||||
CONF_VOLTAGE: sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_VOLT,
|
||||
accuracy_decimals=2,
|
||||
accuracy_decimals=1,
|
||||
device_class=DEVICE_CLASS_VOLTAGE,
|
||||
),
|
||||
CONF_CURRENT: sensor.sensor_schema(
|
||||
|
@ -71,7 +71,7 @@ PHASE_SENSORS = {
|
|||
PV_SENSORS = {
|
||||
CONF_VOLTAGE: sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_VOLT,
|
||||
accuracy_decimals=2,
|
||||
accuracy_decimals=1,
|
||||
device_class=DEVICE_CLASS_VOLTAGE,
|
||||
),
|
||||
CONF_CURRENT: sensor.sensor_schema(
|
||||
|
@ -135,13 +135,13 @@ CONFIG_SCHEMA = (
|
|||
),
|
||||
cv.Optional(CONF_ENERGY_PRODUCTION_DAY): sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_KILOWATT_HOURS,
|
||||
accuracy_decimals=2,
|
||||
accuracy_decimals=1,
|
||||
device_class=DEVICE_CLASS_ENERGY,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
),
|
||||
cv.Optional(CONF_TOTAL_ENERGY_PRODUCTION): sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_KILOWATT_HOURS,
|
||||
accuracy_decimals=0,
|
||||
accuracy_decimals=1,
|
||||
device_class=DEVICE_CLASS_ENERGY,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue