Hello,
I am playing for the first time with shell commands and I could use some help/advices to finalize my setup.
I have two Netatmo presence cameras on my terrace and I would like to easily put the detect mode on/off and control light + dimmer.
I have found a php API to achieve this and have a script named presence.php accepting 3 attributes (entity, action, percent)
In my configuration file I have :
#Shell Commands
shell_command:
netatmo_presence_terrasse: 'php /config/shell_commands/presence.php {{entity}} {{action}} {{percent}}'
I test the script via the developer tools and it works as expected :
Service : shell_command.netatmo_presence_terrasse
Service Data : {"entity":"light","action":"on","percent":33}
Now, I would like to have a light switch calling this Shell Command, a toggle for detect on/off and, if possible, a slide for the dimmer.
I am a bit lost on the next steps …
Do I need to first create a script and find out how to define it as a light ?
Thank you very much for your help/advice,
Tibus