Files
ha_config/sensors.yaml
2026-07-15 12:31:07 +02:00

323 lines
7.1 KiB
YAML

#- platform: template
# sensors:
# Gaszähler, kommend von ESPHome, aufbereiten für Energy
# gasincubicmeter:
# value_template: >
# {% if states('sensor.gasverbrauch') | float == 0 %}
# {{ states('sensor.gasincubicmeter') }}
# {% else %}
# {{ states('sensor.gasverbrauch') | float }}
# {% endif %}
# unit_of_measurement: m³
# device_class: gas
# attribute_templates:
# state_class: total_increasing
- platform: snmp
name: "HPE Switch Uptime"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.1.3.0
value_template: "{{ (value | float / 6000) | round(1) }}"
unit_of_measurement: "Minuten"
## port1
- platform: snmp
name: "HPE Switch Port 1 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.1
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 1 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.1
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 1 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.1
unit_of_measurement: "Bytes"
scan_interval: 10
## port2
- platform: snmp
name: "HPE Switch Port 2 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.2
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 2 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.2
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 2 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.2
unit_of_measurement: "Bytes"
scan_interval: 10
## port9
- platform: snmp
name: "HPE Switch Port 9 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.9
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 9 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.9
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 9 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.9
unit_of_measurement: "Bytes"
scan_interval: 10
## port10
- platform: snmp
name: "HPE Switch Port 10 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.10
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 10 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.10
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 10 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.10
unit_of_measurement: "Bytes"
scan_interval: 10
## port11
- platform: snmp
name: "HPE Switch Port 11 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.11
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 11 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.11
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 11 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.11
unit_of_measurement: "Bytes"
scan_interval: 10
## port19
- platform: snmp
name: "HPE Switch Port 19 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.19
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 19 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.19
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 19 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.19
unit_of_measurement: "Bytes"
scan_interval: 10
## port21
- platform: snmp
name: "HPE Switch Port 21 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.21
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 21 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.21
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 21 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.21
unit_of_measurement: "Bytes"
scan_interval: 10
## port23
- platform: snmp
name: "HPE Switch Port 23 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.23
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 23 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.23
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 23 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.23
unit_of_measurement: "Bytes"
scan_interval: 10
## port24
- platform: snmp
name: "HPE Switch Port 24 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.24
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 24 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.24
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port 24 Traffic Out"
host: 192.168.0.4
community: IhrCommunityString
baseoid: 1.3.6.1.2.1.2.2.1.16.24
unit_of_measurement: "Bytes"
scan_interval: 10
## porttrk1
- platform: snmp
name: "HPE Switch Port Trk1 Status"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.7.54
value_template: >
{% if value == '1' %}
Connected
{% else %}
Disconnected
{% endif %}
scan_interval: 10
- platform: snmp
name: "HPE Switch Port Trk1 Traffic In"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.10.54
unit_of_measurement: "Bytes"
scan_interval: 10
- platform: snmp
name: "HPE Switch Port Trk1 Traffic Out"
host: 192.168.0.4
community: realm_local
baseoid: 1.3.6.1.2.1.2.2.1.16.54
unit_of_measurement: "Bytes"
scan_interval: 10