I have a switch that runs a curl command line that was working fine, but I believe since the update to where commandline functionality is defined under it’s own integration it has been generating a warning in my HA log:
[homeassistant.components.command_line] Updating Command Line Switch Internal Camera took longer than the scheduled update interval 0:00:30
Before the upgrade I had the config defined under the switch integration , and it never generated a warning.
The curl command is running fine and responds within a second. The actual switch is also working fine, but I still get this warning message. I’m tempted to define a log filter to exclude that warning, but I’d rather identify the cause and implement a proper fix.
The config from my command_line.yaml file is:
- switch:
name: "Internal Camera"
command_on: !secret internal_camera_on
command_off: !secret internal_camera_off
command_state: !secret internal_camera_status
value_template: '{{ "profile=1" in value }}'
The secret entry is: internal_camera_status: '/usr/bin/curl -X GET "http://192.168.1.4:8086/admin?user=home&pw=password"'
I have tried rebooting the host, but that didn’t solve it.
This is the same commandline as before and the switch works fine, I just keep getting loads of these warning message in my log file all the time.
There might not be a cause as such.
You have just got a slightly slower integration that have moved the time over a limit for a warning.
You will get those warnings from time to time.
Sometimes it is due to other pieces of codes hogging resources, like for updates, especially the database updates can be heavy at times.