Combine / adding up two time variabele

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Paul92
Posts: 9
Joined: Thursday 16 November 2017 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Netherlands
Contact:

Combine / adding up two time variabele

Post by Paul92 »

Hi all,

I was searching for a solution to create a custom time input for a switch on the dashboard (not via switch timers).
The time for switching on/off must be very easy to change frequently.

No I was thinking to create a workaround as follow:

- Created a selector switch for hours (00-23u)
- Created a selector switch for minutes (steps of 10 minutes 00, 10, 20, 30 ....50)
(dashboard is dashticz).
time input
time input
1.JPG (11.35 KiB) Viewed 172 times
Per selector I write the value to a hour and minute variable via json
selector switch action
selector switch action
2.JPG (48.64 KiB) Viewed 172 times
The variable changes
variabele value
variabele value
3.JPG (19.87 KiB) Viewed 172 times

Does someone know / can advise / help me how to combine these two variabele [hh:mm] into one variabele?
The 02:00h and 00:20h in the example must be 02:20h.
Afterwards I can compare this with the system time and switch on/off.

Thanks
Paul
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest