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
|
@ -2,7 +2,7 @@
|
|||
"domain": "fritzbox",
|
||||
"name": "AVM FRITZ!SmartHome",
|
||||
"documentation": "https://www.home-assistant.io/integrations/fritzbox",
|
||||
"requirements": ["pyfritzhome==0.6.5"],
|
||||
"requirements": ["pyfritzhome==0.6.7"],
|
||||
"ssdp": [
|
||||
{
|
||||
"st": "urn:schemas-upnp-org:device:fritzbox:1"
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -1566,7 +1566,7 @@ pyforked-daapd==0.1.11
|
|||
pyfreedompro==1.1.0
|
||||
|
||||
# homeassistant.components.fritzbox
|
||||
pyfritzhome==0.6.5
|
||||
pyfritzhome==0.6.7
|
||||
|
||||
# homeassistant.components.fronius
|
||||
pyfronius==0.7.1
|
||||
|
|
|
@ -1091,7 +1091,7 @@ pyforked-daapd==0.1.11
|
|||
pyfreedompro==1.1.0
|
||||
|
||||
# homeassistant.components.fritzbox
|
||||
pyfritzhome==0.6.5
|
||||
pyfritzhome==0.6.7
|
||||
|
||||
# homeassistant.components.fronius
|
||||
pyfronius==0.7.1
|
||||
|
|
|
@ -121,7 +121,7 @@ class FritzDeviceSwitchMock(FritzDeviceBaseMock):
|
|||
battery_level = None
|
||||
device_lock = "fake_locked_device"
|
||||
energy = 1234
|
||||
voltage = 230
|
||||
voltage = 230000
|
||||
fw_version = "1.2.3"
|
||||
has_alarm = False
|
||||
has_powermeter = True
|
||||
|
|
|
@ -77,14 +77,14 @@ async def test_setup(hass: HomeAssistant, fritz: Mock):
|
|||
],
|
||||
[
|
||||
f"{SENSOR_DOMAIN}.{CONF_FAKE_NAME}_voltage",
|
||||
"230",
|
||||
"230.0",
|
||||
f"{CONF_FAKE_NAME} Voltage",
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
SensorStateClass.MEASUREMENT,
|
||||
],
|
||||
[
|
||||
f"{SENSOR_DOMAIN}.{CONF_FAKE_NAME}_electric_current",
|
||||
"0.0246869565217391",
|
||||
"0.025",
|
||||
f"{CONF_FAKE_NAME} Electric Current",
|
||||
ELECTRIC_CURRENT_AMPERE,
|
||||
SensorStateClass.MEASUREMENT,
|
||||
|
|
Loading…
Add table
Reference in a new issue