How can I set the icon or a unique_id to an SNMP configuration? This page says I can, but I get this error:
Invalid config for [sensor.snmp]: [icon] is an invalid option for [sensor.snmp]. Check: sensor.snmp->icon. (See ?, line ?).
How can I set the icon or a unique_id to an SNMP configuration? This page says I can, but I get this error:
Invalid config for [sensor.snmp]: [icon] is an invalid option for [sensor.snmp]. Check: sensor.snmp->icon. (See ?, line ?).
Show the yaml that produces the error please?
Having a quick look at the code, it seems the doc needs updating an that icon
is actually not supported (anymore?).
Oh of course!
#SNMP - Side PDU
- platform: snmp
name: Side PDU Current
host: <secret>
community: <secret>
baseoid: 1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.1
unit_of_measurement: A
value_template: "{{((value | float) / 10) | float}}"
icon: mdi:lightning-bolt
I also tried “unique_id” and got the same thing. I’m just looking for a way to set the icon because right now it’s just an eyeball.
I don’t know why you can’t set it here, as per the docs (noting Chris’ comment, of course), but you should be able to set it in your configuration.yaml
.
How do I do that?
I’m happy to move this back to configuration.yaml, but it didn’t work there either.
I was looking into that, but I don’t understand how to reference the objects. There’s no unique_id associated.
I figured it out! I just put the name that it gets after the integration loads.
customize:
sensor.side_pdu_current:
icon: mdi:power
I tried this but the icon is just blank after.