Skip to content

Commit

Permalink
Fix black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ollo69 committed Oct 15, 2024
1 parent b29975e commit 42ab5e8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for ASUSWRT devices."""

from __future__ import annotations

from homeassistant.config_entries import ConfigEntry
Expand Down
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Asuswrt binary sensors."""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/button.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Switches for AsusWrt buttons."""

from __future__ import annotations

from collections.abc import Callable
Expand Down
13 changes: 7 additions & 6 deletions custom_components/asuswrt_custom/device_tracker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for ASUSWRT routers."""

from __future__ import annotations

from homeassistant.components.device_tracker import SourceType
Expand Down Expand Up @@ -102,13 +103,13 @@ def async_on_demand_update(self) -> None:
self._device = self._router.devices[self._device.mac]
self._attr_extra_state_attributes = {}
if self._device.last_activity:
self._attr_extra_state_attributes[
ATTR_LAST_TIME_REACHABLE
] = self._device.last_activity.isoformat(timespec="seconds")
self._attr_extra_state_attributes[ATTR_LAST_TIME_REACHABLE] = (
self._device.last_activity.isoformat(timespec="seconds")
)
if self._device.connected_to:
self._attr_extra_state_attributes[
ATTR_CONNECTED_TO
] = self._device.connected_to
self._attr_extra_state_attributes[ATTR_CONNECTED_TO] = (
self._device.connected_to
)
self.async_write_ha_state()

async def async_added_to_hass(self) -> None:
Expand Down
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Diagnostics support for Asuswrt."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Switches for AsusWrt switches."""

from __future__ import annotations

from collections.abc import Callable
Expand Down
1 change: 1 addition & 0 deletions custom_components/asuswrt_custom/update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for AsusWrt update platform."""

from __future__ import annotations

from datetime import timedelta
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Global fixtures for integration_blueprint integration."""

# Fixtures allow you to replace functions with a Mock object. You can perform
# many options via the Mock to reflect a particular behavior from the original
# function that you want to see without going through the function's actual logic.
Expand Down

0 comments on commit 42ab5e8

Please sign in to comment.