Kaynağa Gözat

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 ay önce
ebeveyn
işleme
43f1e7f2ff
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  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
         i = 0
         for timing in timings:
         for timing in timings:
             if timing.high_us > 65535:
             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)
                 raw.append(timing.low_us)
             elif timing.low_us > 65535:
             elif timing.low_us > 65535:
                 raw.append(timing.high_us)
                 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:
             else:
                 raw.append(timing.high_us)
                 raw.append(timing.high_us)
                 raw.append(timing.low_us)
                 raw.append(timing.low_us)