FHEM Forum

FHEM => English Corner => Thema gestartet von: kroonen am 23 Oktober 2021, 22:29:42

Titel: Useing icon for on off how remove on of from interface
Beitrag von: kroonen am 23 Oktober 2021, 22:29:42
Hi,

I got my lights on fhem. I have in the webintrface the icon , and also ON OFF. How can I remove ON OFF, and stil the icon keeps working with toggle?

fhem> l Woonkamerlamp
Internals:
   DEVICETOPIC Woonkamerlamp
   FUUID      5ea88d72-f33f-d772-72e2-11e110dc535d561a
   IODev      mqtt2
   LASTInputDev mqtt2
   MSGCNT     63
   NAME       Woonkamerlamp
   NR         12
   STATE      OFF
   TYPE       MQTT2_DEVICE
   mqtt2_MSGCNT 63
   mqtt2_TIME 2021-10-23 22:26:01
   JSONMAP:
     POWER      state
   READINGS:
     2021-10-23 22:26:01   Heap            27
     2021-10-23 20:20:00   IODev           mqtt2
     2021-10-23 21:50:56   Info1_FallbackTopic cmnd/woonkamerlamp_fb/
     2021-10-23 21:50:56   Info1_GroupTopic cmnd/tasmotas/
     2021-10-23 21:50:56   Info1_Module    Shelly 1
     2021-10-23 21:50:56   Info1_Version   10.0.0(tasmota)
     2021-10-23 21:50:56   Info2_Hostname  Woonkamerlamp
     2021-10-23 21:50:56   Info2_IPAddress 192.168.170.14
     2021-10-23 21:50:56   Info2_WebServerMode Admin
     2021-10-23 21:50:56   Info3_RestartReason Software/System restart
     2021-10-20 10:12:01   Interlock       OFF
     2021-10-23 21:50:56   LWT             Online
     2021-10-23 22:26:01   LoadAvg         19
     2021-10-23 22:26:01   state           OFF
Attributes:
   IODev      mqtt2
   autocreate 0
   devStateIcon ON:FS20.on@orange OFF:FS20.off
   group      Lampen
   icon       light_ceiling_light
   jsonMap    POWER:state
   model      tasmota_basic_state_power1
   readingList tele/woonkamerlamp/LWT:.* LWT
  tele/woonkamerlamp/STATE:.* { json2nameValue($EVENT,'',$JSONMAP) }
  tele/woonkamerlamp/SENSOR:.* { json2nameValue($EVENT,'',$JSONMAP) }
  tele/woonkamerlamp/INFO.:.* { json2nameValue($EVENT,'',$JSONMAP) }
  tele/woonkamerlamp/UPTIME:.* { json2nameValue($EVENT,'',$JSONMAP) }
  stat/woonkamerlamp/RESULT:.* { json2nameValue($EVENT,'',$JSONMAP) }
   room       Woonkamer
   setList    OFF:noArg    cmnd/woonkamerlamp/POWER 0
  ON:noArg     cmnd/woonkamerlamp/POWER 1
  TOGGLE:noArg cmnd/woonkamerlamp/POWER 2
Titel: Antw:Useing icon for on off how remove on of from interface
Beitrag von: TomLee am 23 Oktober 2021, 23:08:03
set Woonkamerlamp attrTemplate tasmota_set_lowercase_texts_and_state1 ?

edit:

und lösche dein Attribut devstateIcon
Titel: Antw:Useing icon for on off how remove on of from interface
Beitrag von: Benni am 24 Oktober 2021, 07:54:56
setting the attribute webCmd of the device with a colon ":" should do the trick:

attr Woonkamerlamp webCmd :
gb#
Titel: Antw:Useing icon for on off how remove on of from interface
Beitrag von: Beta-User am 24 Oktober 2021, 08:21:34
und lösche dein Attribut devstateIcon

...or alternatively: set the third part for each of the respective states:

ON:FS20.on@orange:OFF OFF:FS20.off:ON
Titel: Antw:Useing icon for on off how remove on of from interface
Beitrag von: kroonen am 24 Oktober 2021, 20:37:50
thnx the

webcmd :

works fine.