Hey,
I’ve been trying to set up a SNMP controlled relay using the snmp switch integration but, although I can control the relay I cannot get the state in the same switch.
So this is what I have for the switch:
switch:
- platform: snmp
name: 'Test Relay'
version: "2c"
# unique_id: 'test_relay_01'
host: 192.168.1.180
baseoid: 1.3.6.1.4.1.30586.46.0.8.0
community: 'webrelay'
payload_on: 1
payload_off: 0
command_payload_on: 1
command_payload_off: 0
vartype: OctetString
And this is how it shows
Again, the control works but not the state.
So I created a snmp sensor to check if I can get the state of the switch like this:
- platform: snmp
name: "Test Relay Status"
host: 192.168.1.180
version: "2c"
community: 'webrelay'
baseoid: 1.3.6.1.4.1.30586.46.0.8.0
accept_errors: true
And this is what I get
So it seems to work, but how can I get the state in the snmp switch integration? Am I missing something?
HassOS + Core 2023.9.3