From 39e6aac63b85c14c9ae5ac034d444367e9a71546 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Tue, 7 May 2024 17:41:38 +0200 Subject: [PATCH] Fix after rebasing --- kasa/smart/modules/firmware.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/kasa/smart/modules/firmware.py b/kasa/smart/modules/firmware.py index bd5e5ef7..16704ef0 100644 --- a/kasa/smart/modules/firmware.py +++ b/kasa/smart/modules/firmware.py @@ -1,20 +1,19 @@ """Implementation of firmware module.""" from __future__ import annotations -import asyncio +import asyncio +import logging from datetime import date from typing import TYPE_CHECKING, Any, Optional -from pydantic.v1 import BaseModel, Field, validator - -from ...feature import Feature # When support for cpython older than 3.11 is dropped # async_timeout can be replaced with asyncio.timeout from async_timeout import timeout as asyncio_timeout +from pydantic.v1 import BaseModel, Field, validator from ...exceptions import SmartErrorCode -from ...feature import Feature, FeatureType +from ...feature import Feature from ..smartmodule import SmartModule if TYPE_CHECKING: @@ -83,17 +82,21 @@ class Firmware(SmartModule): self._add_feature( Feature( device, - "Current firmware version", + id="current_firmware_version", + name="Current firmware version", container=self, attribute_getter="current_firmware", + category=Feature.Category.Info, ) ) self._add_feature( Feature( device, - "Available firmware version", + id="available_firmware_version", + name="Available firmware version", container=self, attribute_getter="latest_firmware", + category=Feature.Category.Info, ) )