Show/hide tiles dynamically based on device preferences

Is there a way to show/hide or enable/disable standard tiles based on what the user chooses on the preferences (settings) screen?

What Preferences screen?

I’ve kind of faked it for now by adding a “disabled” state to the tile, although this has made the code really long-winded and it’s adding irrelevant status updates to the device log.

It would be much better if I could just somehow either set the tile to hidden or add/remove it via code.

Yes, that’s the page I read when I asked my original question. There doesn’t appear to be any visible/hidden property for a tile or a way to add/remove tiles dynamically via code. Using the documentation on the page I did manage to add a “disabled” state to my tiles, but it’s not ideal.

I was just wondering if there’s further documentation of some undocumented functionality.

I am abusing component devices for that. By adding and removing childs you can sort of fake it.

Can you elaborate? I’m already using child devices anyway and these are the tiles I want to show/hide.

I had the need for a multstate switch handler, but i do not know in advance how many states/tiles i get. Also the nuber of states could change on the fly as are the names of the states.

the parent device handler is domoticzSelector and it state child is domoticzSelectorState it might not be applicable to your case, but you might work around it…code is still a work in progress, some thing need to be done more efficient, but it does the job in my setup.

I’ll have a look, that’s similar to my scenario. I have a 2 channel relay, so if you’re using both channels then there’s a master device with 3 tiles (master switch, switch 1, switch 2). But if you’re just using one relay output on the device I’ve added an option to not bother creating the child devices and I just want 1 tile on the master device.