예제 #1
0
    def __init__(self, uplink, system_id, ventilation):
        """Init."""
        super().__init__(uplink, system_id, [])

        self._ventilation = ventilation
        self.entity_id = ENTITY_ID_FORMAT.format('{}_{}_{}'.format(
            DOMAIN_NIBE, system_id,
            str(ventilation.name).lower()))

        self.get_parameters([
            ventilation.fan_speed,
            ventilation.ventilation_boost,
            ventilation.extract_air,
            ventilation.exhaust_speed_normal,
            ventilation.exhaust_air,
            ventilation.exhaust_speed_1,
            ventilation.exhaust_speed_2,
            ventilation.exhaust_speed_3,
            ventilation.exhaust_speed_4,
        ])
예제 #2
0
파일: fan.py 프로젝트: runevad/hass_nibe
    def __init__(self, system: NibeSystem, ventilation: VentilationSystem):
        """Init."""
        parameters = {
            ventilation.fan_speed,
            ventilation.ventilation_boost,
            ventilation.extract_air,
            ventilation.exhaust_speed_normal,
            ventilation.exhaust_air,
            ventilation.exhaust_speed_1,
            ventilation.exhaust_speed_2,
            ventilation.exhaust_speed_3,
            ventilation.exhaust_speed_4,
        }
        super().__init__(system, parameters)

        self._ventilation = ventilation
        self.entity_id = ENTITY_ID_FORMAT.format(
            "{}_{}_{}".format(
                DOMAIN_NIBE, system.system_id, str(ventilation.name).lower()
            )
        )
        self._attr_name = ventilation.name
        self._attr_unique_id = "{}_{}".format(system.system_id, ventilation.fan_speed)
예제 #3
0
 def __init__(self, tuya):
     """Init Tuya fan device."""
     super().__init__(tuya)
     self.entity_id = ENTITY_ID_FORMAT.format(tuya.object_id())
     self.speeds = [STATE_OFF]
예제 #4
0
 def __init__(self, tuya):
     """Init Tuya fan device."""
     super().__init__(tuya)
     self.entity_id = ENTITY_ID_FORMAT.format(tuya.object_id())
     self.speeds = [STATE_OFF]