Skip to content

Commit

Permalink
Add debug logging to humidifier workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
ejohb committed Apr 14, 2023
1 parent 76cb1fc commit ca6938a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/electriq_cdx_pro_le.be
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ callbacks=[
In(
def (value,data)
if data.entity.values.find('preset_mode','Smart')=='Smart'
# If unit is in Smart mode, disallow any changes to target humidity, by force-publishing 55%.
hct.log_debug('Unit is in Smart mode, so disallowing any changes to target humidity. Force-publishing 55%.')
return hct.Publish(55)
else
hct.tuya_send(2,4,value)
Expand Down
1 change: 1 addition & 0 deletions examples/electriq_cdx_pw.be
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ callbacks=[
# The only way to resolve this is to force a full Tuya update whenever the target humidity changes to 55.
# That update is wrapped in a delay, so that its result should not win the race condition with the original update to 55, and be overridden.
if value==55 && data.value_last!=55
hct.log_debug('Unit set to 55% target humidity. Forcing full Tuya update (TuyaSend0)')
tasmota.set_timer(TUYA0_DELAY, tuyasend0)
end
return value
Expand Down

0 comments on commit ca6938a

Please sign in to comment.