Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to call a script instead of remote.send call #36

Open
stain3565 opened this issue Feb 5, 2023 · 2 comments
Open

How to call a script instead of remote.send call #36

stain3565 opened this issue Feb 5, 2023 · 2 comments

Comments

@stain3565
Copy link
Contributor

I am using the remote cards with a ZS06 Zigbee IR remote that requires the publishing of ir_send_code mqtt topics to transmit the ir signals. So I tried to set up the buttons to call a script that then creates and publishes an appropriate mqtt topic.

I have had a few attempts including those below:

pwr: call: script.living_room_ir_button data: button_pressed: '{{ input_text.btyouview_pwr_text }}'

pwr: service: script.living_room_ir_button data: button_pressed: '{{ input_text.btyouview_pwr_text }}'

These have not worked and all the example remotes are using the remote.send method in their calls. Is there any way that the card button call can trigger a script rather than a remote.send command or is there a way of tailoring the remote.send to actually call a script?

@lukaszsobala
Copy link

I have a similar question. Is there a way to make it publish a MQTT topic instead of calling the Remote service?

@stain3565
Copy link
Contributor Author

I have created a remote for Roku Premiere that does just that. an Mqtt message is published, containing the ir string and, in my case, a zigbeemqtt sonoff ir blaster processes this and sends the ir. I have added it to the github ptoject and guess i am just waiting for this to be accepted and merged. Not sure how long that process will take though. However, whilst waiting for that to happen, I have created a zip file which i will attach here. Hope it helps. A few more details are in the ReadMe file under the title Roku Premiere. Apologies that there are extra folder levels but the code is all there
generic-remote-control-card_2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants