Make an outlet blink

Following the development of this feature for lights (and at the request to develop the same for plugs), here is a test image

docker pull cicoub13/gladys:blink-electric-plug

:warning: This is a test image, run it at your own risk. Here is the documentation for this type of image.

We chose to handle both types (lights/plugs) in the same action type.

@pierre-gilles I developed a migration to handle existing scenes. I feel like I’m doing everything correctly and the logs indicate that too, but the change isn’t applied (as if the save isn’t working).

https://github.com/cicoub13/Gladys/blob/feat-blink-electric-plug/server/migrations/20240426100609-change-blinking-light-action.js

2024-04-28T21:49:46+0200 \u003cinfo\u003e 20240426100609-change-blinking-light-action.js:16 (Object.up) Scene migration: Found 1 scenes with light.blink action
2024-04-28T21:49:46+0200 \u003cinfo\u003e 20240426100609-change-blinking-light-action.js:21 () Scene migration: Updating action light.blink with device.blink
2024-04-28T21:49:46+0200 \u003cinfo\u003e 20240426100609-change-blinking-light-action.js:26 () Scene migration: Saving updated scene Blinking lights

cc @guim31 @GBoulvin

1 Like

So efficient! Thank you!

I’m traveling, I won’t be able to test it before Thursday :innocent:. But there’s no reason it should fail :wink:

That’s so cool :slight_smile: except that I can’t test it either, I tinkered with my NAS a bit so I’ll have to set it back up before putting my test Gladys back in place…

Hi @cicoub13, well done — super efficient :clap:

Quick question: do we really need to rename the action?

In itself, even if we let the user select an outlet, it’s still to make a lamp blink, right?

Would there be any case where a user would want to make an outlet blink to use something else on that outlet? I doubt it.

So for me we don’t mention outlet anywhere — even in the interface « Make lights blink » is sufficient, it’s just that the user can select an outlet among the lights, right?

1 Like

Ah yes, taking a step back, that makes more sense. And it saves me from having to migrate :wink: I’ll change that

2 Likes

It’s fixed. Image cicoub13/gladys:blink-electric-plug ready to test.

PR here Feat blink light from switch device by cicoub13 · Pull Request #2064 · GladysAssistant/Gladys · GitHub

1 Like

@cicoub13 I just tested it, it works fine for me!

Just a little UX feedback, since the lists of lights and outlets are concatenated, the order is lost and so it can be hard to find your way around:

Maybe we could add sorting to the table so it’s properly ordered?

See review: gladys (Gladys Anne) · GitHub

2 Likes

Indeed, excellent point.
Other than that, it’s running smoothly!
Thanks @cicoub13!

1 Like

Change made, PR and Docker image up to date :white_check_mark:

1 Like

Thanks @cicoub13 for the fixes, it’s good for me!

It’s merged and it will be included in the next Gladys release :rocket:

3 Likes

This feature is available in Gladys Assistant 4.40:

I’m closing this thread, feel free to create a new one if you have any feedback :slight_smile:

Thanks to @cicoub13 for developing it!

2 Likes