So I found a way to call the script form HA
automation:
- alias: "SM_Brother_set_time"
trigger:
# Trigger when smart plug goes on
- platform: state
entity_id: swicht.smartplug_printer
action:
service: shell_command.update_brother_time
shell_command:
update_brother_time: '/usr/bin/php/home/homeassistant/custom/scripts/update_brother_time.php'
I got that idea from here: how to run script form HA triggered on automation so thanks @joe248 for sharing it.
And then @wgjhstt247 explained here how to get php working in a container
I’ll try to get it to run, and will be back to report results.