I am trying to use a Home Assistant flowcard in a HomeyScript using the runFlowCardAction to call the ‘chime_tts.say’ service on HA from HomeyScript, but so far I have not gotten it to function.
I tried several things so far, but always get an error.
//Attempt 1
const MediaPlayer = "media_player.woonkamer"
action ={
"id": "homey:app:io.home-assistant.community:callServiceEntity",
"args": [
{"service":"chime_tts.say"},
{"entity":MediaPlayer},
{"data":"{\"volume_level\": 0.56,\"fade_audio\": true,\"message\": \"Dit is een testje vanuit Homey\"}"}
]
}
test = await Homey.flow.runFlowCardAction(action)
console.log(test)
//Attempt 2
action ={
"id": "homey:app:io.home-assistant.community:callServiceEntity",
"args": {
"service":"chime_tts.say",
"entity":MediaPlayer,
"data":"{\"volume_level\": 0.56,\"fade_audio\": true,\"message\": \"Dit is een testje vanuit Homey\"}"
}
}
test = await Homey.flow.runFlowCardAction(action)
console.log(test)
//Attempt 2
action ={
"id": "homey:app:io.home-assistant.community:callServiceEntity",
"args": [
{"variable":{"name":"service"},"value":"chime_tts.say"},
{"variable":{"name":"entity"},"value":MediaPlayer},
{"variable":{"name:":"data"},"value":"{\"volume_level\": 0.56,\"fade_audio\": true,\"message\": \"Dit is een testje vanuit Homey\"}"}
]
}
test = await Homey.flow.runFlowCardAction(action)
console.log(test)