Skip to content

Commit

Permalink
Update elgato to 5.1.0 (#103530)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Nov 6, 2023
1 parent 08b43c4 commit 8371fe5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/elgato/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ async def async_get_config_entry_diagnostics(
"""Return diagnostics for a config entry."""
coordinator: ElgatoDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
return {
"info": coordinator.data.info.dict(),
"state": coordinator.data.state.dict(),
"info": coordinator.data.info.to_dict(),
"state": coordinator.data.state.to_dict(),
}
2 changes: 1 addition & 1 deletion homeassistant/components/elgato/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"integration_type": "device",
"iot_class": "local_polling",
"quality_scale": "platinum",
"requirements": ["elgato==5.0.0"],
"requirements": ["elgato==5.1.0"],
"zeroconf": ["_elg._tcp.local."]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ ecoaliface==0.4.0
electrickiwi-api==0.8.5

# homeassistant.components.elgato
elgato==5.0.0
elgato==5.1.0

# homeassistant.components.eliqonline
eliqonline==1.2.2
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ easyenergy==0.3.0
electrickiwi-api==0.8.5

# homeassistant.components.elgato
elgato==5.0.0
elgato==5.1.0

# homeassistant.components.elkm1
elkm1-lib==2.2.6
Expand Down
8 changes: 4 additions & 4 deletions tests/components/elgato/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ def mock_elgato(
"homeassistant.components.elgato.config_flow.Elgato", new=elgato_mock
):
elgato = elgato_mock.return_value
elgato.info.return_value = Info.parse_raw(
elgato.info.return_value = Info.from_json(
load_fixture(f"{device_fixtures}/info.json", DOMAIN)
)
elgato.state.return_value = State.parse_raw(
elgato.state.return_value = State.from_json(
load_fixture(f"{device_fixtures}/{state_variant}.json", DOMAIN)
)
elgato.settings.return_value = Settings.parse_raw(
elgato.settings.return_value = Settings.from_json(
load_fixture(f"{device_fixtures}/settings.json", DOMAIN)
)

# This may, or may not, be a battery-powered device
if get_fixture_path(f"{device_fixtures}/battery.json", DOMAIN).exists():
elgato.has_battery.return_value = True
elgato.battery.return_value = BatteryInfo.parse_raw(
elgato.battery.return_value = BatteryInfo.from_json(
load_fixture(f"{device_fixtures}/battery.json", DOMAIN)
)
else:
Expand Down
18 changes: 7 additions & 11 deletions tests/components/elgato/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
# name: test_diagnostics
dict({
'info': dict({
'display_name': 'Frenck',
'displayName': 'Frenck',
'features': list([
'lights',
]),
'firmware_build_number': 192,
'firmware_version': '1.0.3',
'hardware_board_type': 53,
'mac_address': None,
'product_name': 'Elgato Key Light',
'serial_number': 'CN11A1A00001',
'wifi': None,
'firmwareBuildNumber': 192,
'firmwareVersion': '1.0.3',
'hardwareBoardType': 53,
'productName': 'Elgato Key Light',
'serialNumber': 'CN11A1A00001',
}),
'state': dict({
'brightness': 21,
'hue': None,
'on': True,
'saturation': None,
'on': 1,
'temperature': 297,
}),
})
Expand Down

0 comments on commit 8371fe5

Please sign in to comment.