mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-04 06:32:07 +00:00 
			
		
		
		
	Remove frost_protection feature (#1009)
This provides the same functionality as the state in `TemperatureControl`, so we should not expose this separately.
This commit is contained in:
		@@ -2,15 +2,8 @@
 | 
			
		||||
 | 
			
		||||
from __future__ import annotations
 | 
			
		||||
 | 
			
		||||
from typing import TYPE_CHECKING
 | 
			
		||||
 | 
			
		||||
from ...feature import Feature
 | 
			
		||||
from ..smartmodule import SmartModule
 | 
			
		||||
 | 
			
		||||
# TODO: this may not be necessary with __future__.annotations
 | 
			
		||||
if TYPE_CHECKING:
 | 
			
		||||
    from ..smartdevice import SmartDevice
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class FrostProtection(SmartModule):
 | 
			
		||||
    """Implementation for frost protection module.
 | 
			
		||||
@@ -19,23 +12,8 @@ class FrostProtection(SmartModule):
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    REQUIRED_COMPONENT = "frost_protection"
 | 
			
		||||
    # TODO: the information required for current features do not require this query
 | 
			
		||||
    QUERY_GETTER_NAME = "get_frost_protection"
 | 
			
		||||
 | 
			
		||||
    def __init__(self, device: SmartDevice, module: str):
 | 
			
		||||
        super().__init__(device, module)
 | 
			
		||||
        self._add_feature(
 | 
			
		||||
            Feature(
 | 
			
		||||
                device,
 | 
			
		||||
                "frost_protection_enabled",
 | 
			
		||||
                name="Frost protection enabled",
 | 
			
		||||
                container=self,
 | 
			
		||||
                attribute_getter="enabled",
 | 
			
		||||
                attribute_setter="set_enabled",
 | 
			
		||||
                type=Feature.Type.Switch,
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def enabled(self) -> bool:
 | 
			
		||||
        """Return True if frost protection is on."""
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user