Hello,
i will control my QNAP with the existing sensors.
And now i will show the ip.
This is a Attripute of the EHT0
sensor.n0011100001_network_up_eth0
{
"Mask": "255.255.255.0",
"Max Speed": 1000,
"Packets (Err)": 5,
"icon": "mdi:upload",
"Packets (TX)": 20951319,
"friendly_name": "N0011100001 Network Up (eth0)",
"IP Address": "10.10.100.60",
"unit_of_measurement": "MB/s",
"Packets (RX)": 26744618
}
so i create a sensor template:
- platform: template
sensors:
nas_sensor_uptime:
value_template: '{{ states.sensor.n0011100001_status.attributes.Uptime }}'
nas_ip:
value_template: '{{ states.sensor.n0011100001_network_up_eth0.attributes.IP Address }}'
Uptime works but the IP Adress not… i think it’s the blank…
LOG:
2017-07-05 13:20:43 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'Address') for dictionary value @ data['sensors']['nas_ip']['value_template']. Got '{{ states.sensor.n0011100001_network_up_eth0.attributes.IP Address }}'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.template/
Have someone the solution?
thanks for you help!