FHEM > English Corner

Useing icon for on off how remove on of from interface

(1/1)

kroonen:
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?


--- Code: ---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

--- Ende Code ---

TomLee:

--- Code: ---set Woonkamerlamp attrTemplate tasmota_set_lowercase_texts_and_state1
--- Ende Code ---
?

edit:

und lösche dein Attribut devstateIcon

Benni:
setting the attribute webCmd of the device with a colon ":" should do the trick:


--- Code: ---attr Woonkamerlamp webCmd :
--- Ende Code ---

gb#

Beta-User:

--- Zitat von: TomLee am 23 Oktober 2021, 23:08:03 ---und lösche dein Attribut devstateIcon

--- Ende Zitat ---

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


--- Code: ---ON:FS20.on@orange:OFF OFF:FS20.off:ON
--- Ende Code ---

kroonen:
thnx the

webcmd :

works fine.

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln