Help with a re-usable date time editor or similar widget

This is generally something i keep running into - reusable complex widgets. I have a node red and home remote system that controls all the heating and pretty much all the lights. It is fairly comprehensive. In the heating for example - the programmer needs a time editor which is done on a room by room basis but has muliple times per day. Each room has a boost override that has a time and temp setting. the whole house has a boost override time setting - usually used for holidays. The time info comes from and goes to node red in the same format but I need to present the info in home remote on different display. What is in common is editing the time.

You can see I have several devices that need a date and/or time configuring. It would make sense to have a common tile or other form of page that allowed you to change or enter a time with certain constraints set up as the tile is activated.

There are several parts to this that I am unsure of:
a) In one instance where i need this functionality - this is room heating boost time setting. So you click on a room, it goes to the details tile for that room device. Part of the detail tile has the boost time. Click on the boost time and ideally I want a further tile or screen to allow me to edit the time and send the changed result back.
Can I create a tile with a details tile (the basic settings for a given room) that in turn has a details tile (the time setting) and will the navigation work as expected?

b) Do I need to maintain custom variables so I know which root device I came from or would nested details such as I described - always work with @Device.attribute?

c) Am I being especially dim and missing some easy way of doing this sort of thing - creating a widget with useful functionality that we can use all over the place?

Many thanks for yoru suggestions.
Andy

Yes. Do exactly that. It will be no different than any of the other reusable templates, like thermostats, speakers, etc. You can create your own template (widget) that can be linked to all of your datetime devices.

Thanks. Your help got this working and also answered my other question on methods.

I added a button on the thermostat details tile behind the time I want to edit.

Added eventtrigger action to the button and assigned it to a method target name App, method PushPage with my new time editor page as the parameter.

(My big breakthrough here was realising that by selecting App as the target name - a dropdown list of methods was now available to pick from.)

Click on the time (button) on the details tile and the new page appears and the @Device is still referencing the original room device. Magic.

1 Like