Преглед изворни кода

fix (infrared): Don't drag out timings on IR command when splitting

Just use sleep to wait the full amount of time, don't try to include some
time in the actual commands
Jason Rumney пре 3 месеци
родитељ
комит
43f1e7f2ff
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      custom_components/tuya_local/infrared.py

+ 4 - 4
custom_components/tuya_local/infrared.py

@@ -49,13 +49,13 @@ class TuyaLocalInfrared(TuyaLocalEntity, InfraredEntity):
         i = 0
         for timing in timings:
             if timing.high_us > 65535:
-                split[i] = timing.high_us - 65535
-                raw.append(65535)
+                split[i] = timing.high_us
+                raw.append(0)
                 raw.append(timing.low_us)
             elif timing.low_us > 65535:
                 raw.append(timing.high_us)
-                raw.append(65535)
-                split[i + 2] = timing.low_us - 65535
+                raw.append(0)
+                split[i + 2] = timing.low_us
             else:
                 raw.append(timing.high_us)
                 raw.append(timing.low_us)