Skip to content

Commit 9b24a8d

Browse files
authored
Guard for glances v2 (#28)
* add gitignore * Guard for glances v2 * remove .gitignore
1 parent 1cadd3c commit 9b24a8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

glances_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ async def get_ha_sensor_data(self) -> dict[str, Any]:
150150
sensor_data["network"] = {}
151151
for network in networks:
152152
sensor_data["network"][network["interface_name"]] = {
153-
"is_up": network["is_up"],
153+
"is_up": network.get("is_up"),
154154
"rx": round(network["rx"] / 1024, 1),
155155
"tx": round(network["tx"] / 1024, 1),
156156
"speed": round(network["speed"] / 1024**3, 1),

0 commit comments

Comments
 (0)