Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/bliss/intraled.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.5, created at 2024-11-15 02:12 +0000

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3from daiquiri.core.hardware.abstract import HardwareProperty 

4from daiquiri.core.hardware.abstract.light import Light as AbstractLight, LightStates 

5from daiquiri.core.hardware.bliss.object import BlissObject 

6 

7import logging 

8 

9logger = logging.getLogger(__name__) 

10 

11 

12class StateProperty(HardwareProperty): 

13 def translate_from(self, value): 

14 for s in LightStates: 

15 if s == value.upper(): 

16 return s 

17 

18 return ["UNKNOWN"] 

19 

20 

21class Intraled(BlissObject, AbstractLight): 

22 PROPERTY_MAP = { 

23 "intensity": HardwareProperty("intensity"), 

24 "temperature": HardwareProperty("temperature"), 

25 "state": StateProperty("modus"), 

26 }