Ver Fonte

Fix issues introduced in recent cleanup commits

- tesla_aroma_diffuser: used translation_mode instead of translation_key
- goldair_gpph_heater: remove power_factor class from tests
- utils: reorder headers the way ruff likes it
Jason Rumney há 3 semanas atrás
pai
commit
53b69109d9

+ 1 - 1
custom_components/tuya_local/devices/tesla_aroma_diffuser.yaml

@@ -111,7 +111,7 @@ entities:
         name: sensor
         unit: min
   - entity: select
-    translation_mode: light_mode
+    translation_key: light_mode
     category: config
     dps:
       - id: 101

+ 0 - 1
tests/devices/test_goldair_gpph_heater.py

@@ -55,7 +55,6 @@ class TestGoldairHeater(
             POWERLEVEL_DPS,
             self.entities.get("sensor_power_level"),
             unit=PERCENTAGE,
-            device_class=SensorDeviceClass.POWER_FACTOR,
             testdata=("2", 40),
         )
         self.setUpBasicBinarySensor(

+ 3 - 1
util/untranslated_entities.py

@@ -2,11 +2,13 @@
 
 import json
 import sys
+
+from homeassistant.util import slugify
+
 from custom_components.tuya_local.helpers.device_config import (
     TuyaDeviceConfig,
     available_configs,
 )
-from homeassistant.util import slugify
 
 
 def main() -> int:

+ 2 - 0
util/untranslated_select.py

@@ -2,7 +2,9 @@
 
 import json
 import sys
+
 from common_funcs import FakeDevice
+
 from custom_components.tuya_local.helpers.device_config import (
     TuyaDeviceConfig,
     available_configs,