@ngenkov wrote:
Hello, I’m trying to set a value (integer) to a SNMP-enabled switch.
The value is defined using input_number. My example code is:input_number: brightness: name: Brightness initial: 0 min: 0 max: 1023 step: 1 switch: - platform: snmp name: "Set Brightness" command_payload_on: "{{ states('input_number.brightness') | int }}" host: 192.168.1.100 community: private baseoid: 1.3.6.1.4.1.42505.8.2.4.1.3.0
The result is receiving: AttributeError: ‘str’ object has no attribute ‘getTagSet’. Here is the last log message:
File "/usr/local/lib/python3.7/site-packages/pysnmp/proto/api/v1.py", line 42, in setOIDVal varBind.setComponentByPosition(1).getComponentByPosition(1).setComponentByType(val.getTagSet(), val, verifyConstraints=False, matchTags=False, matchConstraints=False, innerFlag=True)
Am I wrong about the value of command_payload_on ?
Posts: 1
Participants: 1