1
0

Remove SNMP

This commit is contained in:
Przemek Grondek 2024-04-28 20:21:42 +02:00
parent f6fdc3a677
commit e5337eabfb

View File

@ -315,90 +315,6 @@ calendar:
- "Formula 1"
sensor:
# SNMP
- platform: snmp
name: "Router eth0 link speed"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.2.2.1.5.4
accept_errors: true
unit_of_measurement: "Mbits"
value_template: "{{((value | int) / 1000000) | int}}"
- platform: snmp
name: "Router eth1 link speed"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.2.2.1.5.5
accept_errors: true
unit_of_measurement: "Mbits"
value_template: "{{((value | int) / 1000000) | int}}"
- platform: snmp
name: "Router eth2 link speed"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.2.2.1.5.6
accept_errors: true
unit_of_measurement: "Mbits"
value_template: "{{((value | int) / 1000000) | int}}"
- platform: snmp
name: "Router eth3 link speed"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.2.2.1.5.7
accept_errors: true
unit_of_measurement: "Mbits"
value_template: "{{((value | int) / 1000000) | int}}"
- platform: snmp
name: "Router eth4 link speed"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.2.2.1.5.8
accept_errors: true
unit_of_measurement: "Mbits"
value_template: "{{((value | int) / 1000000) | int}}"
- platform: snmp
version: 2c
name: "Router uptime"
host: 192.168.60.1
community: home
baseoid: 1.3.6.1.2.1.25.1.1.0
accept_errors: true
value_template: >-
{% set timetick = value | int %}
{% set minutes = ((timetick % 360000) / 6000) | int%}
{% set hours = ((timetick % 8640000) / 360000) | int %}
{% set days = (timetick / 8640000) | int %}
{%- if timetick < 6000 -%}
Less than a minute
{%- else -%}
{%- if days > 0 -%}
{%- if days == 1 -%}
1 day
{%- else -%}
{{ days }} days
{%- endif -%}
{%- endif -%}
{%- if hours > 0 -%}
{%- if days > 0 -%}
{{ ', ' }}
{%- endif -%}
{%- if hours == 1 -%}
1 hr
{%- else -%}
{{ hours }} hrs
{%- endif -%}
{%- endif -%}
{%- if minutes > 0 -%}
{%- if days > 0 or hours > 0 -%}
{{ ', ' }}
{%- endif -%}
{%- if minutes == 1 -%}
1 min
{%- else -%}
{{ minutes }} min
{%- endif -%}
{%- endif -%}
{%- endif -%}
# Power
- platform: integration
name: "3D printer energy Total"