Action to fire Javascript command
See original GitHub issueIs your feature request related to a problem? Please describe.
I use Fully Kiosk Browser on wall-mounted tablets for my Home Assistant UI. Fully has custom javascript functions (like fully.setScreenBrightness(123)
) you can call to manipulate the device, such as setting screen brightness, turning the screen off, etc. I would like to make use of some of these functions from the HA UI.
Describe the solution you’d like
A new type of action
that will fire a specified javascript function when the button is tapped
Describe alternatives you’ve considered Have not seen any alternatives. Currently using TileBoard which has this capability, but am trying to migrate over to Lovelace for my wall-mounted tablets.
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Creating a JavaScript action - GitHub Docs
In this guide, you'll learn how to build a JavaScript action using the actions toolkit.
Read more >JavaScript Command Design Pattern - Dofactory
The Command pattern encapsulates actions as objects. Command objects allow for loosely coupled systems by separating the objects that issue a request from ......
Read more >How can I execute JavaScript at the command prompt?
The below example demonstrates to run the JavaScript code at the Command Prompt. Enter every step in the terminal line by line. //...
Read more >Execute JavaScript code stored as a string - Stack Overflow
You can execute it using a function. Example: var theInstructions = "alert('Hello World'); var x = 100"; var F=new Function (theInstructions); return(F());.
Read more >How To Execute Javascript Commands in Cypress - DZone
With the help of the example in this article, you can modify and perform Javascript actions in Cypress like MovetoElement, Scroll, MouseMove, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You could even call multiple services doing so:
@Hamsterman , @pioskala
you need
type: custom:button-card
type: button doesn’t work for it