diff --git a/examples/proscenic_t21.be b/examples/proscenic_t21.be index 6d1fba3..15d84e4 100644 --- a/examples/proscenic_t21.be +++ b/examples/proscenic_t21.be @@ -70,7 +70,7 @@ hct.Number( nil, 'minutes', nil, - 'mdi:timer', + 'mdi:timer-sync', { /v->v:'tuyareceived#DpType2Id105', /v->5:'power3#state' @@ -109,6 +109,17 @@ hct.Number( end ) +# Mode/status sensor. Note: This does not seem to exist on all versions. +hct.Sensor( + 'Air Fryer Mode', + nil, + 'mdi:chef-hat', + { + /value->{0:'Ready',1:'Delayed Cook',2:'Cooking',3:'Keep Warm',4:'Off',5:'Cooking Complete'}.find(value,'Unknown'): + 'tuyareceived#dptype4id5' + } +) + # Lastly we add the cookbook pull-down. This has already been covered in the README: https://github.com/fmtr/hct#example-walkthrough hct.Select( @@ -120,14 +131,5 @@ hct.Select( /value->tasmota.cmd('TuyaEnum1 '+str(value)) ) -# Mode/status sensor. Note: This does not seem to exist on all versions. -hct.Sensor( - 'Air Fryer Mode', - nil, - 'mdi:chef-hat', - { - /value->{0:'Ready',1:'Delayed Cook',2:'Cooking',3:'Keep Warm',4:'Off',5:'Cooking Complete'].find(value,'Unknown'): - 'tuyareceived#dptype4id5' - } -) +