-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Hello, i have upload/download from my internet box
1/
i want to set max as : upload + download
type: custom:dual-gauge-card
title: fbx
min: 0
max: sensor.my_fbx
outer:
entity: sensor.my_fbx
attribute: up
label: up
inner:
entity: sensor.my_fbx
attribute: down
label: down
sensors.yaml :
- platform: template
sensors:
my_fbx:
unique_id: my_fbx
friendly_name: "Freebox u/d max"
unit_of_measurement: "mbps"
icon_template: 'mdi:network'
value_template: >
{% set u = states('sensor.freebox_upload_speed') | int %}
{% set d = states('sensor.freebox_download_speed') | int %}
{{ (u + d) }}
attribute_templates:
up: "{{ states('sensor.freebox_upload_speed') | int }}"
down: "{{ states('sensor.freebox_download_speed') | int }}"
updown: "{{ (states('sensor.freebox_upload_speed') | int) + (states('sensor.freebox_download_speed') | int) | int }}"
My sensor works well,
but max do not take sensor.my_fbx value wich is equal to up+down
example : up=5 down=7 sensor.my_fbx=12 : max should be 12
2/
inside sensor.my_fbx i have 3 attributes : up, down, updown
could i define max as an attribute ?
instead of :
max: sensor.my_fbx
i would like :
max:
entity: sensor.my_fbx
attribute: updown
This syntax seem not work ?
help please :)
Metadata
Metadata
Assignees
Labels
No labels