Bump pyfritzhome to 0.6.7 (#78324)
This commit is contained in:
parent
8dbe293ae2
commit
6f02f7c6ce
6 changed files with 10 additions and 12 deletions
|
@ -87,7 +87,7 @@ SENSOR_TYPES: Final[tuple[FritzSensorEntityDescription, ...]] = (
|
|||
device_class=SensorDeviceClass.POWER,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suitable=lambda device: device.has_powermeter, # type: ignore[no-any-return]
|
||||
native_value=lambda device: device.power / 1000 if device.power else 0.0,
|
||||
native_value=lambda device: round((device.power or 0.0) / 1000, 3),
|
||||
),
|
||||
FritzSensorEntityDescription(
|
||||
key="voltage",
|
||||
|
@ -96,9 +96,7 @@ SENSOR_TYPES: Final[tuple[FritzSensorEntityDescription, ...]] = (
|
|||
device_class=SensorDeviceClass.VOLTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suitable=lambda device: device.has_powermeter, # type: ignore[no-any-return]
|
||||
native_value=lambda device: device.voltage
|
||||
if getattr(device, "voltage", None)
|
||||
else 0.0,
|
||||
native_value=lambda device: round((device.voltage or 0.0) / 1000, 2),
|
||||
),
|
||||
FritzSensorEntityDescription(
|
||||
key="electric_current",
|
||||
|
@ -107,7 +105,7 @@ SENSOR_TYPES: Final[tuple[FritzSensorEntityDescription, ...]] = (
|
|||
device_class=SensorDeviceClass.CURRENT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suitable=lambda device: device.has_powermeter, # type: ignore[no-any-return]
|
||||
native_value=lambda device: device.power / device.voltage / 1000
|
||||
native_value=lambda device: round(device.power / device.voltage, 3)
|
||||
if device.power and getattr(device, "voltage", None)
|
||||
else 0.0,
|
||||
),
|
||||
|
@ -118,7 +116,7 @@ SENSOR_TYPES: Final[tuple[FritzSensorEntityDescription, ...]] = (
|
|||
device_class=SensorDeviceClass.ENERGY,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
suitable=lambda device: device.has_powermeter, # type: ignore[no-any-return]
|
||||
native_value=lambda device: device.energy / 1000 if device.energy else 0.0,
|
||||
native_value=lambda device: (device.energy or 0.0) / 1000,
|
||||
),
|
||||
# Thermostat Sensors
|
||||
FritzSensorEntityDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue