Ver Fonte

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 há 6 meses atrás
pai
commit
43f1e7f2ff
1 ficheiros alterados com 4 adições e 4 exclusões
  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)