test(plant): default_value+none-render on 3 down-host snmp sensors [#344]
This commit is contained in:
@@ -12,13 +12,14 @@ sensor:
|
|||||||
community: kn3lmgmt
|
community: kn3lmgmt
|
||||||
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
accept_errors: true
|
accept_errors: true
|
||||||
|
default_value: "-999"
|
||||||
unit_of_measurement: "°F"
|
unit_of_measurement: "°F"
|
||||||
unique_id: pfv_artroom_temperature
|
unique_id: pfv_artroom_temperature
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
||||||
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none }}
|
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none else none }}
|
||||||
|
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: "PFV garage temperature"
|
name: "PFV garage temperature"
|
||||||
@@ -27,13 +28,14 @@ sensor:
|
|||||||
community: kn3lmgmt
|
community: kn3lmgmt
|
||||||
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
accept_errors: true
|
accept_errors: true
|
||||||
|
default_value: "-999"
|
||||||
unit_of_measurement: "°F"
|
unit_of_measurement: "°F"
|
||||||
unique_id: pfv_garage_temperature
|
unique_id: pfv_garage_temperature
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
||||||
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none }}
|
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none else none }}
|
||||||
|
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: "PFV tsys1 rack temperature"
|
name: "PFV tsys1 rack temperature"
|
||||||
@@ -48,7 +50,7 @@ sensor:
|
|||||||
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
{% set ext = value | regex_findall('External:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
{% set int = value | regex_findall('Internal:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
{% set c = (ext | first) if ext else ((int | first) if int else none) %}
|
||||||
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none }}
|
{{ ((c | float * 9 / 5) + 32) | round(1) if c is not none else none }}
|
||||||
|
|
||||||
# --- Native lm-sensors hosts (label picked per host ground truth 2026-08-27) ---
|
# --- Native lm-sensors hosts (label picked per host ground truth 2026-08-27) ---
|
||||||
# tsys3 Precision 7510: CPU package
|
# tsys3 Precision 7510: CPU package
|
||||||
@@ -197,11 +199,12 @@ sensor:
|
|||||||
community: kn3lmgmt
|
community: kn3lmgmt
|
||||||
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
baseoid: .1.3.6.1.4.1.8072.1.3.2.3.1.2.9.108.109.115.101.110.115.111.114.115
|
||||||
accept_errors: true
|
accept_errors: true
|
||||||
|
default_value: "-999"
|
||||||
unit_of_measurement: "°F"
|
unit_of_measurement: "°F"
|
||||||
unique_id: pfv_subopi3_temperature
|
unique_id: pfv_subopi3_temperature
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set m = value | regex_findall('temp1:\s*\+?(-?\d+\.?\d*)') %}
|
{% set m = value | regex_findall('temp1:\s*\+?(-?\d+\.?\d*)') %}
|
||||||
{{ ((m | first | float * 9 / 5) + 32) | round(1) if m }}
|
{{ ((m | first | float * 9 / 5) + 32) | round(1) if m else none }}
|
||||||
|
|
||||||
- platform: snmp
|
- platform: snmp
|
||||||
name: "PFV subopi-dev-3 temperature"
|
name: "PFV subopi-dev-3 temperature"
|
||||||
|
|||||||
Reference in New Issue
Block a user