FHEM Forum

FHEM => Automatisierung => Thema gestartet von: HarryT am 29 Januar 2016, 09:10:08

Titel: get/set attributes?
Beitrag von: HarryT am 29 Januar 2016, 09:10:08
Hi

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

{HT}
Titel: Antw:get/set attributes?
Beitrag von: marvin78 am 29 Januar 2016, 09:13:55
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.
Titel: Antw:get/set attributes?
Beitrag von: rudolfkoenig am 29 Januar 2016, 10:15:20
@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.
Titel: Antw:get/set attributes?
Beitrag von: marvin78 am 29 Januar 2016, 10:19:05
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() ;)
Titel: Antw:get/set attributes?
Beitrag von: rudolfkoenig am 29 Januar 2016, 10:33:27
Sorry, I don't want to embarrass anybody.
ZitatIt's AttrVall(), not AttVal()
Lets agree on AttrVal()  :)
Titel: Antw:get/set attributes?
Beitrag von: marvin78 am 29 Januar 2016, 10:37:58
Oh dear. Not my day.  ;D