Switch Profiles of streamdeck based on home assistant sensor state

Hello everyone,
I’m trying to find a way for my streamdeck to switch profiles automatically (not through the autoswitch profile embeded in eldago with app changes) but directly through some Home assistant sensors.
Does anyone has an idea how to do that? For exemple, my phone state is ‘off_hook’, I have a profile dedicated to controling mute and hang up button of my phone that is displayed on streamdeck!
image

My first research gave me this interesting link : Triggering Stream Deck Profiles for Logic Pro Plugins - #17 by Reknes - Questions & Suggestions - Keyboard Maestro Discourse