Hello,
actual you can only choose a certain time in the rule option but not a date. Is it possible to implement?
-
rule Option for is "date"
-
sure you can do that. but guess this is not known to most of the users.
try this one here :WHEN its "12-23-2016 23:00" then do some stuff
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
also possible like???
WHEN its "12-23 23:00" then do some stuff
Every year on 1st of january??
-
Great!!! I didn’t know this yet. Also works with variables. Should be documented!!!
-
@Heizelmann sorry it is a question not an answer…
-
Sorry, I tried this example in your question and it seems it works.
-
Just tested this
‘‘‘
when it is “12-28-2016 20:30” then
‘‘‘and it fires at 20:30, but today it is the 27th.☹️
Seems that the date part is ignored. -
hm … you are right. does not work. strange!!
the date part is ignored.pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
you could create a shellsensor with a date command and then compare the date in a rule like
"when $datedevice = “23.12.2016” then do some stuff
maybe this would do the jobpimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Did you tried with
when it is december 29-2016
?Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Sorry, but instead of try and error it would be better if a core developer could inform - or better document - the complete possible rule syntax concerning date/time.
-
you are right! need to clarify this and have asked about that at the core dev chat.
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@Heizelmann said in rule Option for is "date":
Sorry, but instead of try and error it would be better if a core developer could inform - or better document - the complete possible rule syntax concerning date/time.
For the time being, please search the forum for examples and try the solutions suggested by other users. Thanks
EDIT:
when it is december 28-2016
as suggested by @koffienl works, btw. The following also works for me, but I think this depends on my locale settingswhen its Mi 28. Dez
. It should also be possible to use ISO-8601 format, i.e.when its 2016-12-28
, but this does not seems to work. Most likely, it is bug of the predicate parser or the underlying base library."It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig what is the solution for sth. every year in 27th oft december?
-
not testet but
when it’s 12 Dec
when its 12 December
when its December 12as i said, with my previously mentioned workaound you can do this for sure.
how this worksthree devices
"id": "date-year", "name": "Date Year", "class": "ShellSensor", "attributeName": "year", "attributeType": "string", "command": "date +%Y", "interval": 300000 }, { "id": "date-month", "name": "Date Month", "class": "ShellSensor", "attributeName": "month", "attributeType": "string", "command": "date +%m", "interval": 300000 }, { "id": "date-day", "name": "Date Day", "class": "ShellSensor", "attributeName": "day", "attributeType": "string", "command": "date +%d", "interval": 300000 }
so now your rule :
WHEN $date-day = "27" and $date-month = "12" THEN do something
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
just testet
WHEN 3 January THEN do some stuff
works perfect for today - 3. Januarypimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
Sorry for digging this up again. I had a long pimatic pause, updated everything and now my rules won’t work anymore.
Before my hiatus (v0.8) I updated some variables with rules like so:
IF its Mar 1-31 THEN $uv-light-on="10:15" and $uv-light-off="20:45"
Another rule turned on/off that light depending on those variables:
IF its $uv-light-on and $terra-state="awake" THEN turn uv_light on
($terra-state is in fact “awake”)But now after updating/upgrading the whole system + pimatic those rules don’t work with none of the suggested date predicates.
Thanks,
f