Skip to content

Commit

Permalink
Fix single sequences being changed to strings (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 authored Jan 9, 2025
1 parent 27947ae commit 01db1e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/opnsense/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def _handle_coordinator_update(self) -> None:
self._available = True

self._attr_extra_state_attributes = {}
for attr in "device_id":
for attr in ["device_id"]:
self._attr_extra_state_attributes[attr] = temp.get(attr, None)
self.async_write_ha_state()

Expand Down
2 changes: 1 addition & 1 deletion custom_components/opnsense/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def _compile_service_switches(
for service in state.get("services", []):
if service.get("locked", 1) == 1:
continue
for prop_name in "status":
for prop_name in ["status"]:
entity = OPNsenseServiceSwitch(
config_entry=config_entry,
coordinator=coordinator,
Expand Down

0 comments on commit 01db1e4

Please sign in to comment.