get/set attributes?

Begonnen von HarryT, 29 Januar 2016, 09:10:08

Vorheriges Thema - Nächstes Thema

HarryT

Hi

Is there a way to get/set an attribute like  the enable/disable attribute of autocreate?

{HT}
FHEM 6.4 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

marvin78

Please have a look at setattr in the commandref for setting the attribute, AttrVal(DEVICE,ATTRIBUTE,STANDARD) gives back the current value of an attribute.

rudolfkoenig

@marvin78: I don't find setattr in the commandref. Have I missed something?
@HarryT: There are a lot of ways: Via GUI (FHEMWEB) in the detail window, via the FHEM commands "list device" or "attr device disable", or programmatically via AttVal() or $attr{devName}{attrName} = Value.

marvin78

#3
Zitat von: rudolfkoenig am 29 Januar 2016, 10:15:20
@marvin78: I don't find setattr in the commandref. Have I missed something?

You're right. My mistake. It's attr. I was somewhere else with by head.

But I don't like it, if someone plays dumb just to embarrass another one.You made a mistake yourself. It's AttrVall(), not AttVal() ;)

rudolfkoenig

Sorry, I don't want to embarrass anybody.
ZitatIt's AttrVall(), not AttVal()
Lets agree on AttrVal()  :)

marvin78