Closed mhzawadi closed 1 year ago
The problem is that the data contains already a unit 23.7 C
, so the value cannot be converted to a number.
I don't know much about the snmp integration, but the trailing C
should be stripped by the integration.
Maybe you should use value_template
to strip it:
https://www.home-assistant.io/integrations/snmp#value_template
# Example configuration.yaml entry
sensor:
- platform: snmp
name: "Printer uptime"
host: 192.168.2.21
baseoid: 1.3.6.1.2.1.1.3.0
accept_errors: true
unit_of_measurement: "minutes"
value_template: "{{((value | int) / 6000) | int}}"
thanks for the prompt, config drafted and now need to be home to restart HA
config now fixed, thanks for the help
# Poseidon model 3268
- platform: snmp
host: 192.168.49.159
baseoid: 1.3.6.1.4.1.21796.3.3.3.1.5.1
community: horwood
name: "snmp telemetry01 Temp"
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
value_template: "{{ value|replace(' C', '') | float }}"
The problem
I have an SNMP temperature sensory that has been working fine, but now doesnt
What version of Home Assistant Core has the issue?
core-2023.5.3
What was the last working version of Home Assistant Core?
core-2022 - maybe
What type of installation are you running?
Home Assistant OS
Integration causing the issue
snmp
Link to integration documentation on our website
https://www.home-assistant.io/integrations/snmp/
Diagnostics information
This device cannot be added from the UI
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
the endpoint is a
Poseidon model 3268
monitored by nagios just fine, screenshot from nagios