Autor Thema: Useing icon for on off how remove on of from interface  (Gelesen 472 mal)

Offline kroonen

  • Full Member
  • ***
  • Beiträge: 191
    • http://www.kroonen.eu/mobile
Useing icon for on off how remove on of from interface
« 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

Offline TomLee

  • Hero Member
  • *****
  • Beiträge: 3651
  • ... wer sät, der erntet ...
Antw:Useing icon for on off how remove on of from interface
« Antwort #1 am: 23 Oktober 2021, 23:08:03 »
set Woonkamerlamp attrTemplate tasmota_set_lowercase_texts_and_state1 ?

edit:

und lösche dein Attribut devstateIcon
« Letzte Änderung: 23 Oktober 2021, 23:44:23 von TomLee »

Offline Benni

  • Developer
  • Hero Member
  • ****
  • Beiträge: 2312
  • FHEMinist
Antw:Useing icon for on off how remove on of from interface
« Antwort #2 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#

Offline Beta-User

  • Developer
  • Hero Member
  • ****
  • Beiträge: 16259
Antw:Useing icon for on off how remove on of from interface
« Antwort #3 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
Server: HP-T620@Debian 10, aktuelles FHEM + ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn:MySensors, Weekday-&RandomTimer, Twilight,  AttrTemplate {u.a. mqtt2, mysensors, zwave}

Offline kroonen

  • Full Member
  • ***
  • Beiträge: 191
    • http://www.kroonen.eu/mobile
Antw:Useing icon for on off how remove on of from interface
« Antwort #4 am: 24 Oktober 2021, 20:37:50 »
thnx the

webcmd :

works fine.

 

decade-submarginal