I haven’t tried it, but I believe it should work with in DSL as well. I think it’s supposed to be something like:
when
Time is ItemName
That rule only triggers at the item’s time on the item’s date. If you want the rule to trigger only on the time everyday (that is, ignore the date) then you add timeOnly to it:
Hi Justin,
thank you for the hint and the example.
This works in 3.4.0.M3
With this new time based features can be added.
The goal is to have a widget were the on and off times of a switch item can be configured.
For now I will use the Time Picker from here:
But maybe there are other options available in OH3 now.
This is certainly one perfectly reasonable way to go. There are a couple other widgets in the market place that do something similar, if I recall so have a look around. I know rlkoshak has put a simple DateTime widget in the marketplace. If you want something more involved than that, there’s the fancy timeline widget.
If you have something very particular in mind though, your best chance of getting exactly what you want it to make it yourself. Look at the code of these simple widgets and see how they work to change an item’s time and then see if you can build the exact widget you are dreaming of.
I have a much more basic question regarding expandable f7-cards.
How do I control the height of the expanded card? I have this card which always opens full-screen which especially on the phone doesn’t make sense. Here when it is expanded:
The short answer is “not easily”. The change in card size when expanded is accomplished under-the-hood by the f7 library with calculations of what the final size should be and the animations required to make that smooth. You can override the final height using a stylesheet to apply custom css to the opened card, but unless you want the animation to still expand to a full screen and then suddenly shrink back down to your set height at the end, you’d also have to identify all the animation classes and override all the animation settings and recalculate those for every different screen size.
On larger screens, you have access to 2 f7 css variables, --f7-card-expandable-tablet-height and --f7-card-expandable-tablet-width which allow you set the size of the card when it is determined by the library that it should be smaller than full screen, but on phone screens these have no effect.