0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
206 stars 58 forks source link

Order temp before get the min and max for IRAirConditionerAccessory #433

Closed tuliocll closed 5 months ago

tuliocll commented 5 months ago

I was getting this error when adding a new IR Air:

image

I saw that the minimum value was 32 and max 31 on the logs. After debugging the code, I saw that the code gets the minimum value from array position 0, printing the array I got this: image

I another IR Air the values are ordered:

image

So, I change the code to get the min and max values using the Math object.

0x5e commented 5 months ago

Thanks!