From c13886e00d68e4b1ccc1f6505a9ef371ea32d7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DUPONCHEEL=20S=C3=A9bastien?= Date: Mon, 25 Dec 2023 08:54:53 +0100 Subject: [PATCH] HDMI CEC: Fix HDMIType command (#20308) According to documentation HDMIType is from 0 to 5 but the actual check is lower than 1 and above or equal 6, so the function is never applied. Also note that setting the HDMIType to 0 use the default type value 4, that make impossible the emulation of a TV device. --- tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino b/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino index e77e1a5b0..4a1daf136 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_70_1_hdmi_cec.ino @@ -189,7 +189,7 @@ void CmndHDMISend(void) { // void CmndHDMIType(void) { if (XdrvMailbox.data_len > 0) { - if ((XdrvMailbox.payload < 1) && (XdrvMailbox.payload >= CEC_Device::CDT_LAST)) { + if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < CEC_Device::CDT_LAST)) { uint8_t type = XdrvMailbox.payload; if (type != Settings->hdmi_cec_device_type) { Settings->hdmi_cec_device_type = XdrvMailbox.payload;