Temperature for UniFi switches

UniFi switches already has fan_level, will be great to have temperature as well. UniFi switches has temperature which can be checked using UniFi Network Controller web app.

You can get the temperature throug an SNMP sensor.

sensor:
  - platform: snmp
    name: Temperature Switch Livingroom
    host: 10.10.0.6
    community: 'public'
    baseoid: 1.3.6.1.4.1.4413.1.1.43.1.8.1.5.1.0
    unit_of_measurement: "°C"

You just need to enable SNMP in the UniFi Controller.

1 Like

Thanks it’s works!
Can you give me correct OID for fan level?
I manage to configure SNMPv3 to UniFi Switch and will left config here for other users because it’s little bit tricky:

- platform: snmp
  name: UniFi Switch Temperature
  host: 10.10.0.6
  version: '3'
  username: <Put here user name>
  auth_key: <Put here password>
  priv_key: <Put here password same as for auth_key>
  auth_protocol: hmac-sha
  priv_protocol: aes-cfb-128
  baseoid: 1.3.6.1.4.1.4413.1.1.43.1.8.1.5.1.0
  unit_of_measurement: '°C'
1 Like

Hello I try this sensor with succes with usw-Pro-24 but this doesn’t work for UDM-PRO and US-8-150W Is the baseOID not correct ?
thanks

Interesting because this code is from my US-8-150W switch. For the UDM Pro it’s probably a different baseoid. You need to check it yourself as I don’t own a UDM pro.

How can i Check this ?

Use an SNMP browser, you’ll probably also find the oid on google somewhere.

What is the best SNMP browser that is free and easy to use?