Hi, I created a sensor to monitor the power on status of my TV following the command_line sensor guide.
This is the sensor I created:
binary_sensor:
- platform: command_line
command: 'ping -c 1 192.168.0.2 | grep "1 packets received" | wc -l'
name: 'tv_status'
device_class: connectivity
payload_on: 1
payload_off: 0
and it works well for me both when the TV is on and when it is off, but when it is off the log is filled with these errors:
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:694
First occurred: 20:30:20 (141 occurrences)
Last logged: 22:27:50
Update of binary_sensor.tv_status is taking over 10 seconds
I also tried to add the command_timeout
item by increasing the value (from 15 seconds which is default up to 30 seconds) and also the scan_interval
item by changing the default value (which is equal to 60 seconds) but it didn’t help. null, as if HA ignored the set timeout value and always defaulted to 10 seconds.
From the terminal I typed the command ping -c 1 192.168.0.2
and I counted up to 8 seconds before the answer (with TV off) so it shouldn’t time out … yet …
Has anyone else noticed this problem and if it solved it ???