Command_line switch updates per 30 seconds, why?

using a set of command_line switches

switch:
#Hue hub 2
  - platform: command_line
    switches:
      driveway_buiten_sensor_motion:
        friendly_name: Driveway buiten sensor
        command_on: >
          curl -X PUT -d '{"on":true}' "http://192.168.1.58/api/redactede/sensors/27/config/"
        command_off: >
          curl -X PUT -d '{"on":false}' "http://192.168.1.58/api/redactede/sensors/27/config/"
        command_state: curl http://192.168.1.58/api/redactede/sensors/27/
        value_template: >
          {{value_json.config.on}}

I now (hunting for an unknown error) see this (the command_state) is updated every 30 seconds,

2021-05-01 17:03:44 INFO (SyncWorker_17) [homeassistant.components.command_line.switch] Running state value command: curl http://192.168.1.58/api/redactede/sensors/27/

where I believed it to update only on ‘command’… given the fact I have 23 of these, it would be welcome to bring that down somehow, and still be able to respond per state switch.

Please have a look? thanks

That’s how switches work. They are polled in case their state is changed by something outside home assistant.

yes I understand that, the command_on/of are for pushing the state to the Hub, and the command_state is for polling… (we need that on the Hue hub unfortunately)

yet, reading what’s said here Command line Switch - Home Assistant one would almost think it is either using the command_state or the value_template.

In my setting, I really need both, because without the value_template the switches simply dont function properly

If you specify a value_template that will be used to evaluate the return from the command_state rather than using the result code.

thanks Tom, that is a better explanation than in the documentation, I read that as mutually exclusive…
guess I have to live with the polling every 30 seconds

There are links at the bottom of the page if you would like to clarify it.