How to report user its action didn't succeed?

A user reported this driver didn’t work for him.

We checked the logs and got it:

[string “tuyaEF00_generic_defaults.lua”]:88: attempt to call a nil value (method ‘get_child_by_parent_assigned_key’)

So we found out he uses an old firmware (43.5)

But there wasn’t any warning or something in the screen. It just failed silently.

I would like to report the user that its action didn’t go well for some reason.
How I could accomplish that ?

I can use pcall at create_child to catch the error, but how can I send this to the screen ?

@nayelyz may be able to help your issue

1 Like

You cannot send a notification from the Edge driver, so, in this case, the device was never created, right?

As you mentioned the user uses firmware 43.5, it means he has a Wi-Fi Hub which is the only one with that firmware version, so, you need to mention that having v45 or higher is a requirement to use your driver which implements the parent-child model.

Thanks for the tag, @fido

1 Like

Where is the best place to mention that the driver requires it ?

I tried to use these fields, but I don’t know how to fill them.
Descrição → Description
Informações de suporte → Support Informations

The device is created, but the child device isn’t because I check if the child device exists before calling try_create_device.
In this case, child devices are created in the preferences.

Then, you could use a custom capability to show a message of “success” or “failure” when they request the creation of the child device.

1 Like

What about these fields ?

Do you know how I could define some texts there ?

Here’s an example:


Thanks, @philh30
Just to clarify, @w35l3y, they cannot change dynamically as they are part of the config.yaml file.

1 Like

It would be nice if one of the permissions of a driver was version or other firmware capability flags.