Open i00 opened 4 years ago
Can you write us how step by step add this integration and show code for card as you show on screen ?
@pepeEL Sure I will do this in two separate posts below for ease
Ok i am waitng... Thanks
ANd you are planing to implement SRM integration to official Home Assistant ? As official integration ?
device_tracker:
- platform: synology_srm
host: SynologyRouter.local
password: !secret SynologyRouter
consider_home: 60 # default 180
new_device_defaults:
track_new_devices: true
Add a manual Lovelace card with the following content:
card:
show_header_toggle: false
title: Devices
type: entities
filter:
include:
- attributes:
scanner: SynologySrmDeviceScanner
entity_id: device_tracker.*
options:
entities:
- attribute: mac
- attribute: ip_addr
- icon: 'mdi:ethernet'
- icon: 'mdi:wifi-strength-1'
- icon: 'mdi:wifi-strength-2'
- icon: 'mdi:wifi-strength-4'
- icon: 'mdi:gamepad-variant-outline'
- icon: 'mdi:cellphone-android'
- icon: 'mdi:television'
- icon: 'mdi:dlna'
- icon: 'mdi:desktop-tower'
- icon: 'mdi:nas'
- icon: 'mdi:laptop-chromebook'
- icon: 'mdi:tablet-android'
- icon: 'mdi:cctv'
- icon: 'mdi:printer'
- icon: 'mdi:router-wireless'
icon: 'mdi:devices'
secondary_info:
attribute: band
show_state: false
style: >
{% set lMAC = 1 %} {% set lIP = 2 %} {% set iEthernet = 3 %} {% set
iWiFiBad = 4 %} {% set iWiFiOK = 5 %} {% set iWiFiGood = 6 %} {% set
iGame = 7 %} {% set iPhone = 8 %} {% set iTV = 9 %} {% set iDLNA = 10
%} {% set iDesktop = 11 %} {% set iNAS = 12 %} {% set iLaptop = 13 %}
{% set iTablet = 14 %} {% set iCamera = 15 %} {% set iPrinter = 16 %}
{% set iRouter = 17 %}
div.entity:nth-child({{lMAC}}),div.entity:nth-child({{lIP}}) {
margin-right:0;
} div.entity:nth-child({% if state_attr(config.entity, 'ip_addr') ==
'' %}{{lIP}}{% else %}{{lMAC}}{% endif %}) {
display: none !important;
visibility: hidden !important;
position: absolute !important;
} .secondary {
padding-left:16px;
} {% if state_attr(config.entity, 'is_wireless') == false %}
.secondary {
visibility: hidden;
} .secondary:before {
content: 'Ethernet';
visibility: visible;
} {% else %} .secondary:after {
content: ' (Level {% if state_attr(config.entity, 'mesh_node_id') == 0 %}1{% elif state_attr(config.entity, 'mesh_node_id') == 4 %}3{% elif state_attr(config.entity, 'mesh_node_id') == 3 %}4{% else %}?{% endif %})';
} {% endif %}
div.entity:nth-child({{iEthernet}}),div.entity:nth-child({{iWiFiBad}}),div.entity:nth-child({{iWiFiOK}}),div.entity:nth-child({{iWiFiGood}})
{
--mdc-icon-size: 16px;
position: absolute;
top: 8px;
left: 50px;
visibility: hidden;
} div.entity:nth-child({% if state_attr(config.entity, 'is_wireless')
== false %}{{iEthernet}}{% elif state_attr(config.entity,
'rate_quality') == 'low' %}{{iWiFiBad}}{% elif
state_attr(config.entity, 'rate_quality') == 'middle' %}{{iWiFiOK}}{%
elif state_attr(config.entity, 'rate_quality') == 'high'
%}{{iWiFiGood}}{% endif %}) {
visibility: visible;
} :host>state-badge {
{% if state_attr(config.entity, 'dev_type') != 'others' and state_attr(config.entity, 'dev_type') != 'default' %}
visibility: hidden;
{% endif %}
} div.entity:nth-child(n+{{iGame}}{# << This is the first icon for the
device type #}) {
position: absolute;
top: 0px;
left: 8px;
visibility: hidden;
} div.entity:nth-child({% if state_attr(config.entity, 'dev_type') ==
'gamebox' %}{{iGame}}{% elif state_attr(config.entity, 'dev_type') ==
'phone' %}{{iPhone}}{% elif state_attr(config.entity, 'dev_type') ==
'tv' %}{{iTV}}{% elif state_attr(config.entity, 'dev_type') == 'dlna'
%}{{iDLNA}}{% elif state_attr(config.entity, 'dev_type') == 'computer'
%}{{iDesktop}}{% elif state_attr(config.entity, 'dev_type') == 'nas'
%}{{iNAS}}{% elif state_attr(config.entity, 'dev_type') == 'notebook'
%}{{iLaptop}}{% elif state_attr(config.entity, 'dev_type') == 'tablet'
%}{{iTablet}}{% elif state_attr(config.entity, 'dev_type') == 'ipcam'
%}{{iCamera}}{% elif state_attr(config.entity, 'dev_type') ==
'printer' %}{{iPrinter}}{% elif state_attr(config.entity, 'dev_type')
== 'router' %}{{iRouter}}{% endif %}) {
visibility: visible;
}
type: 'custom:multiple-entity-row'
state: home
sort:
ignore_case: true
method: name
type: 'custom:auto-entities'
ANd you are planing to implement SRM integration to official Home Assistant ? As official integration ?
Yes ... that is why there is a pull request for it ... it was ready months ago ... but in the meantime they decided to change their policy; which now prevents them from merging it ... I have holidays in a little over a month; so will try to update it then
binary_sensor:
- platform: ping
host: 8.8.8.8
name: Online
count: 1
scan_interval: 300
sensor:
- platform: synology_srm_router
host: SynologyRouter.local
password: !secret SynologyRouter
monitored_conditions:
- core.list_ddns_extip
- core.get_system_utilization
- core.list_ddns_record
- platform: scrape
resource: https://www.whoismyisp.org
select: ".isp"
name: 'Internet Provider'
scan_interval: 60 #1 mins
- platform: template
sensors:
wan_download:
value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.rx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}"
friendly_name: Download
unit_of_measurement: Mbit/s
icon_template: 'mdi:download'
wan_upload:
value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.tx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}"
friendly_name: Upload
unit_of_measurement: Mbit/s
icon_template: 'mdi:upload'
Add a manual Lovelace card with the following content:
cards:
- entities:
- entity: binary_sensor.online
icon: 'mdi:web'
name: Status
type: 'custom:multiple-entity-row'
- entity: sensor.internet_provider
icon: 'mdi:web'
name: Provider
- entity: sensor.pi_hole_ads_percentage_blocked_today
name: Adverts Blocked (Last 24 Hours)
- icon: 'mdi:server-network'
name: Devices
state: >
{% set force_upadte = states.input_number.min_timer.state %} {% set i
= namespace() %} {% set i.i = 0 %}{% for item in states.device_tracker
if item.attributes.scanner == 'SynologySrmDeviceScanner' and
item.state == 'home' %}{% set i.i = i.i + 1 %}{% endfor %}{{ i.i }}
tap_action:
action: navigate
navigation_path: /lovelace/network
type: 'custom:template-entity-row'
- label: Routing Load
type: section
- icon: 'mdi:memory'
name: CPU
state: >
{% set cpu =
states.sensor.synology_srm.attributes.core_get_system_utilization.cpu
-%}
{{ cpu.other_load + cpu.system_load + cpu.user_load }} %
type: 'custom:template-entity-row'
- name: null
secondary: Last 15 min average
state: >
{% set cpu =
states.sensor.synology_srm.attributes.core_get_system_utilization.cpu
-%}
{% set cores = 2 -%}
{{ (cpu['15min_load']/cores)|int }} %
type: 'custom:template-entity-row'
- icon: 'mdi:chip'
name: Memory
state: >
{% set memory =
states.sensor.synology_srm.attributes.core_get_system_utilization.memory
-%} {{ memory.real_usage }} % ({{ (memory.memory_size / 1024 *
memory.real_usage /100)|int }} / {{ (memory.memory_size / 1024)|int }}
MB)
type: 'custom:template-entity-row'
- label: External Access
type: section
show_header_toggle: false
style: |
.card-content {
padding-bottom: 0 !important;
}
title: Internet and Network
type: entities
- card:
content: >-
<table width=100%>
{% set ddns_extip =
states.sensor.synology_srm.attributes.core_list_ddns_extip -%}
{% for item in ddns_extip -%}
<tr><td valign=top>IP ({{ item.type }}):</td><td>{{ item.ip }}</td></tr>
<tr><td valign=top>IPv6 ({{ item.type }}):</td><td>{{ item.ipv6 }}</td></tr>
{% endfor -%}
{% set ddns_extip =
states.sensor.synology_srm.attributes.core_list_ddns_record -%}
{% for item in ddns_extip.records %}
{% set Preamble = "<b style='color: darkred;'>" if item.status != 'service_ddns_normal' else '' %}
{% set Postamble = '<br>State: ' + item.status + '</b>' if item.status != 'service_ddns_normal' else '' %}
<tr><td valign=top>{{ item.provider }}:</td><td>{{ Preamble }}{{ item.hostname }}{{ Postamble }}</td></tr>
{% endfor -%}
</table>
ignore_line_breaks: true
type: 'custom:html-template-card'
style: |
ha-card {
padding-top: 0 !important;
padding-left: 16px !important;
padding-bottom: 0 !important;
}
type: 'custom:mod-card'
- entities:
- label: Traffic and Benchmarks (last 24 hours)
type: section
show_header_toggle: false
style: |
.card-content {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
type: entities
- cards:
- aggregate_func: ave
entities:
- entity: sensor.wan_download
index: 0
name: Traffic
- color: '#0000FF44'
entity: sensor.speedtest_download
index: 1
name: Speed Test
font_size: 75
group_by: hour
height: 200
hours_to_show: 24
line_color: '#0000FF'
lower_bound: 0
name: Download
show:
icon: false
labels: true
points: hover
style: |
ha-card {
padding-top: 0 !important;
padding-right: 2px !important;
}
.header,
.graph__legend {
padding-bottom: 0 !important;
}
.info {
display: none !important;
}
.label--max,
.label--min {
box-shadow: unset !important;
}
type: 'custom:mini-graph-card'
- aggregate_func: ave
entities:
- entity: sensor.wan_upload
index: 0
name: Traffic
- color: '#e74c3c44'
entity: sensor.speedtest_upload
index: 1
name: Speed Test
font_size: 75
group_by: hour
height: 200
hours_to_show: 24
line_color: '#e74c3c'
lower_bound: 0
name: Upload
show:
icon: false
labels: true
points: hover
style: |
ha-card {
padding-top: 0 !important;
padding-left: 1px !important;
padding-right: 1px !important;
}
.header,
.graph__legend {
padding-bottom: 0 !important;
}
.info {
display: none !important;
}
.label--max,
.label--min {
box-shadow: unset !important;
}
type: 'custom:mini-graph-card'
- aggregate_func: ave
entities:
- entity: sensor.speedtest_ping
index: 0
name: Ping
- color: '#0000FF44'
entity: sensor.wan_download
index: 1
name: Download
show_fill: false
show_legend: false
y_axis: secondary
- color: '#e74c3c44'
entity: sensor.wan_upload
index: 2
name: Upload
show_fill: false
show_legend: false
y_axis: secondary
- entity: sensor.speedtest_download
index: 3
show_fill: false
show_legend: false
show_line: false
show_points: false
y_axis: secondary
- entity: sensor.speedtest_upload
index: 4
show_fill: false
show_legend: false
show_line: false
show_points: false
y_axis: secondary
font_size: 75
group_by: hour
height: 200
hours_to_show: 24
line_color: var(--accent-color)
lower_bound_secondary: 0
show:
icon_adaptive_color: false
labels: true
labels_secondary: false
points: hover
style: |
ha-card {
padding-top: 0 !important;
padding-left: 1px !important;
padding-right: 1px !important;
}
.header,
.graph__legend {
padding-bottom: 0 !important;
}
.info {
display: none !important;
}
.label--max,
.label--min {
box-shadow: unset !important;
}
type: 'custom:mini-graph-card'
type: horizontal-stack
type: 'custom:vertical-stack-in-card'
ANd you are planing to implement SRM integration to official Home Assistant ? As official integration ?
Yes ... that is why there is a pull request for it ... it was ready months ago ... but in the meantime they decided to change their policy; which now prevents them from merging it ... I have holidays in a little over a month; so will try to update it then
But if you implement is to official integration we also do this config as you show or we can config it by WEBUI from Home Assistant ?
Web UI is now a requirement ... but that will only be for setup ... and for the right side ... also it will only replace this bit:
sensor:
- platform: synology_srm_router
host: SynologyRouter.local
password: !secret SynologyRouter
monitored_conditions:
- core.list_ddns_extip
- core.get_system_utilization
- core.list_ddns_record
But cards we will be must config as you show by manual ? And resources ....?
Yep Lovelace is largely manual; and cards that are for specific types of devices will not get integrated.
I personally also prefer the config.xaml file to the UI config.
ok we are waiting for integration....
ok we are waiting for integration....
It really only saves a small part of the work above (one the easiest parts IMHO) ... finished the instructions btw :)
ok thanks. BTW i am waitng when Synology release new version SRM 1.2.4.... In 2017 start project create new software NSM but Synology stop project.... But it looks better than SRM. More professional.... Looks it is creenshot from NSM and new device SG1000 which also plan release but also lost....
@i00 thanks I'll try it later when I feel better.
but this project was lost.... and no continiue by Synology.
I tried your code but still no luck. ` - entities:
the binary_sensor.online I made with ping is this the right way?
- platform: template sensors: wan_download: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.rx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: Download unit_of_measurement: Mbit/s icon_template: 'mdi:download' wan_upload: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.tx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: Upload unit_of_measurement: Mbit/s icon_template: 'mdi:upload'
Gives me only 0.0
is (usbnet|ppp) correct?
At my sytem I saw: .core_list_ddns_record instead off .core_ddns_record so I replaced this in the code
So any help is welcome. I use Home Assistant on my Synology NAS and have a RT2600AC and two MR2200AC
sensor.synology_srm.attributes.core_get_system_utilization.network gives me `network:
@AlwinHummels ... ahh sorry missed those :) :
binary_sensor:
- platform: ping
host: 8.8.8.8
name: Online
count: 1
scan_interval: 300
sensor:
- platform: scrape
resource: https://www.whoismyisp.org
select: ".isp"
name: 'Internet Provider'
scan_interval: 60 #1 mins
great thanks for your help, it works fine. but the wan_upload and wan_download sensors still gives me a value of 0.0 Can you explain the code so I can fix it.
Thanks again
Can you go to developer tools and copy and paste in the output for your sensor.synology_srm? Thanks
@i00 Here is my output
core_list_ddns_extip:
- ip: 12.34.56.78
ipv6: '0:0:0:0:0:0:0:0'
type: WAN
core_get_system_utilization:
cpu:
15min_load: 57
1min_load: 34
5min_load: 35
device: System
other_load: 1
system_load: 10
user_load: 5
disk:
disk:
- device: sdr
display_name: USB Disk 1
read_access: 0
read_byte: 0
type: usb
utilization: 0
write_access: 0
write_byte: 0
total:
device: total
read_access: 0
read_byte: 0
utilization: 0
write_access: 0
write_byte: 0
memory:
avail_real: 90552
avail_swap: 1256352
buffer: 10636
cached: 162112
device: Memory
memory_size: 524288
real_usage: 44
si_disk: 0
so_disk: 0
swap_usage: 4
total_real: 477388
total_swap: 1310712
network:
- device: total
rx: 159245
tx: 156825
- device: bwlan0
rx: 0
tx: 0
- device: bwlan1
rx: 0
tx: 0
- device: eth0
rx: 96493
tx: 56797
- device: lbr0
rx: 62752
tx: 100028
space:
lun: []
total:
device: total
read_access: 0
read_byte: 0
utilization: 0
write_access: 0
write_byte: 0
volume:
- device: mmcblk0p6
display_name: volume1
read_access: 0
read_byte: 0
utilization: 0
write_access: 0
write_byte: 0
time: 1588936034
core_list_ddns_record:
next_update_time: '2020-05-09 12:32'
records:
- enable: true
heartbeat: true
hostname: xxxxxx.synology.me
id: Synology
ip: 12.34.56.78
ipv6: '0:0:0:0:0:0:0:0'
lastupdated: '2020-05-08 12:32'
net: DEFAULT
provider: Synology
status: service_ddns_normal
username: xxxxx@xxxxx.nl
friendly_name: synology_srm
icon: 'mdi:router-wireless'
Logboekdetails (ERROR)
Logger: homeassistant.components.template.sensor
Source: components/template/sensor.py:237
Integration: template (documentation, issues)
First occurred: 13:41:46 (2 occurrences)
Last logged: 13:41:46
Could not render template Download: UndefinedError: 'mappingproxy object' has no attribute 'core_get_system_utilization'
Could not render template Upload: UndefinedError: 'mappingproxy object' has no attribute 'core_get_system_utilization'
How are you connecting to the internet? ... my script only supports logging from usbnet (4g dongle) and ppp (PPPoE)
Also I imagine that the errors in the log are just because the sensor hadn't hit the router yet to build the attributes at startup.
I connect over IPv4 Automatic so that will be the issue. I have a connectbox from Ziggo (My Provider in the Netherlands) this is in Bridge mode and my RT2600ac is connectet to that box for internet. I don't have a 4g dongle but it's on my wishlist ;-) any recommendations?
Is it rigth when I replace theregex_match('^(usbnet|ppp)' by regex_match('^(lbr|eth)' or just only regex_match('^(total)'
BTW No idea what lbr and the bwlan stands for
You can still get the WAN up / down ... you can actually get the bandwidth on each of the ports too (but generally not that useful for this purpose)... try adding the the lbr one to the regex and see if it looks right
- platform: template sensors: wan_download: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.rx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: Download unit_of_measurement: Mbit/s icon_template: 'mdi:download' wan_upload: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.tx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: Upload unit_of_measurement: Mbit/s icon_template: 'mdi:upload'
Just a minor correcting with the WAN upload and download sensor.
- platform: template sensors: wan_download: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm_router.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.rx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: SRM Download unit_of_measurement: Mbit/s icon_template: 'mdi:download' wan_upload: value_template: "{% set i = namespace() %}{% set i.i = 0 %}{% for item in states.sensor.synology_srm_router.attributes.core_get_system_utilization.network if item.device|regex_match('^(usbnet|ppp)', ignorecase=true) %}{% set i.i = i.i + item.tx %}{% endfor %}{{ ((i.i / 1024 / 1024) * 8)|round(2) }}" friendly_name: SRM Upload unit_of_measurement: Mbit/s icon_template: 'mdi:upload'
Make sure it is "states.sensor.synologysrmrouter.attributes.core_get_system_utilization.network"
The _router part was missing and failing to get network.
Apart from that, excellent work again Kris. Looking forward to this being integrated.
You can still get the WAN up / down ... you can actually get the bandwidth on each of the ports too (but generally not that useful for this purpose)... try adding the the lbr one to the regex and see if it looks right
thank you very much for all your help and patience with me
@clicky73 ... it shouldn't be synology_srm_router unless it has been changed.. the name by default is synology_srm ... you can change the name in the config with the name attribute; or rename it via the interface.
Hey Kirs (@i00)
I am going from your post 4 days ago with the code to enable it to work on the latest version of HA and pull the WAN download and upload data. https://github.com/i00/Chatter/issues/1#issuecomment-624612428 The platform is synology_srm_router and you need to add the _router in the template as previously mentioned to pull the attributes.
You are correct, this is not the default one at the start of this post.
`sensor:
Keep up the good work mate and will be following eagle eyed.
I updated the icon size change to work with 0.110+ in the Left Side example... Basically change:
--iron-icon-height: 16px;
to:
--mdc-icon-size: 16px;
thanks again for the update
Is there any progress to get this sensor as an official integration? Or do you have a updated version? I really like your solution but it seems not working anymore on my setup.
Also ask about any progress :) to add it to integration official?
Or add it through hacs
But finally better Will be to add in official integration
I made a pull request that has been merged into HA for some time now with the device tracker...
As for the router info I did ... but it got declined; as it now requires setup through the integrations screen... even though I made the pull request months before this was required!
Pull request is here: https://github.com/home-assistant/core/pull/31523
ok thanks for reaction but maybe you can add this as a custom component with Hacs
But you can not also add this to setup it by integration screen ?
I haven't looked at how that all works yet; so I have not ... that is why the pull request got rejected in the end. I do plan to visit that again sometime.
Please try do it because we wait for it.... please
@i00 thank you so much for this integration modification, I just followed your guide and everything worked out of the box with the latest SRM update (1.2.4.8xxx Update 1) even today. Now I have your awesomely designed Lovelace cards, you saved me days in setting them up myself from scratch.
It was a breath to setup and follow your directions. I had to change my adapters from ppp to lbr0 (and eth2 i think.. for failover that's on my first lan port) as per my config. Also, it looks like some of the icons were not mapping correctly adding - icon: 'mdi:wifi-strength-3' to the list at the top solved it. But for some reason, I have MAC address followed by an Ethernet icon show up for all my devices instead of just IP addresses like in yours. I think I can probably figure out the tweaks there on my own unless it's already fixed in your new build
...Anyway My only minor request that would make this integration easier to use (other than adding this to HACS) is can you add an option for entity prefix for device_tracker entities? I want to keep my actual device trackers separate from the router ones.
This way I can easily see which device trackers come from a router, so it would be device_tracker.srm_XXXXX
Again thank you sooo much for this!!
Kris, (@i00) I tried figuring out how you created that auto-entities syntax.. but it's way over my head when you started messing with nth-child etc. You sir are a wizard. Can you post your latest syntax for the list card? Maybe some Lovelace cards got updated?
I was able to switch out so IP addresses show up instead of MACs but I still get the Ethernet icon to the right and get a wifi icon next to "Ethernet" text.
Also, any chance of sorting them by connection speed instead of name? That way ethernet will be at the top followed by actual connection speed sorting... Just a thought :)
When I copy and paste your list mine looks like this:
@i00 thank you so much for this integration modification, I just followed your guide and everything worked out of the box with the latest SRM update (1.2.4.8xxx Update 1) even today. Now I have your awesomely designed Lovelace cards, you saved me days in setting them up myself from scratch.
Glad my work is appreciated :)
Also, it looks like some of the icons were not mapping correctly adding - icon: 'mdi:wifi-strength-3' to the list at the top solved it. But for some reason, I have MAC address followed by an Ethernet icon show up for all my devices instead of just IP addresses like in yours. I think I can probably figure out the tweaks there on my own unless it's already fixed in your new build
Already fixed myself ... this is due to changes in updates to multiple-entity-row since I wrote this up; I have updated the yaml under "Left Side" where you copied it from originally :)
...Anyway My only minor request that would make this integration easier to use (other than adding this to HACS) is can you add an option for entity prefix for device_tracker entities? I want to keep my actual device trackers separate from the router ones.
This way I can easily see which device trackers come from a router, so it would be device_tracker.srm_XXXXX
The standard for this is to use the source_type attribute
Again thank you sooo much for this!!
Your welcome
Kris, (@i00) I tried figuring out how you created that auto-entities syntax.. but it's way over my head when you started messing with nth-child etc. You sir are a wizard. Can you post your latest syntax for the list card? Maybe some Lovelace cards got updated?
I was able to switch out so IP addresses show up instead of MACs but I still get the Ethernet icon to the right and get a wifi icon next to "Ethernet" text.
Icon fix ... all related to my fix above :)
Also, any chance of sorting them by connection speed instead of name? That way ethernet will be at the top followed by actual connection speed sorting... Just a thought :)
To sort have a look here ... will be something like (untested):
....
sort:
method: attribute
reverse: true
attribute: current_rate
type: 'custom:auto-entities'
When I copy and paste your list mine looks like this:
Again mentioned the fix for this in my previous post ;)
Thanks for the quick response and fix, works great now. 👍
The standard for this is to use the source_type attribute
Yeah, I saw that in your template, this was more so it's easier to tell apart on the entities list screen or do global customizations/filtering using wildcards for places that don't support attribute filtering.
Your sorting works great! For the record _currentrate was too crazy since it kept updating and jumping around for me. I found that "attribute: band" worked better. Thanks for the tip. Again super impressed with your template hacking of how you are hiding icons that you don't need using div tags :)
On another note, I noticed that not all attribute: dev_type devices are shown. For example on the router I have my Alexas marked as Alexas device type but it shows up as "default" device type. I take it this an issue with synolory_srm or issue with the router API?
Hi i00. When you plan add your integration to official HA or to HACS ?
??
On another note, I noticed that not all attribute: dev_type devices are shown. For example on the router I have my Alexas marked as Alexas device type but it shows up as "default" device type. I take it this an issue with synolory_srm or issue with the router API?
Yep not all device types are listed ... it just defaults to other if the API does not know it ... i imagine that this will be the srm python lib that doesn't support these; since it just uses the routers undocumented API (that does support it obviously).
Hi i00. When you plan add your integration to official HA or to HACS ?
I did submit this; but then they changed their policy several months later to not allow config setups; and so they won't merge it.
I have not looked at implementing it into the integrations interface... if you know how to do this let me know :)
No i dont know. But please think about it.. i believe in you . Please many user wait for it.
Chatter for further information in: https://github.com/home-assistant/core/pull/31523#issuecomment-623335873