-
When a door is unlocked, I want to update the image to an unlocked padlock and also make this image red. I am not sure how to combine the two together. Either of these rules works on it's own but not both of them:
I have also tried this, based on another discussion I saw, but it doesn't seem to work.
There are no errors, but it only briefly flashes the colour it's supposed to be during the state change, then goes back to having no style set (but the image change stays). Both of the above formats have the same effect, to change the image but not retain the new fill colour. Any tips on getting this to work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
I'm on my phone with limited time, so I just looked quickly through it. You should be able to use multiple actions. Enable debug and check your output. I'm also not sure if defining element within the action, are working in all cases. But, I think so. With that said, you could also use the new I'll need to revisit the code another day, for a better answer. I'm sorry about the poor quality today 👍. |
Beta Was this translation helpful? Give feedback.
-
The second example you provided is the correct syntax. Remove the second If it briefly flashes the correct colour then that suggests to me that the state action is working but some code elsewhere is changing it back. |
Beta Was this translation helpful? Give feedback.
Why don't you use a black padlock SVG and a different red padlock SVG?