I want to check if a device was updated before today's sunset, tried:
domoticz.devices('Motion sensor living room').lastUpdate.matchesRule('before sunset')
But to no avail..
another option I came up with is to compare the lastUpdate dateTime of the device with the dateTime of sunset, but how can I check today's sunset dateTime?
Tried:
domoticz.time.sunset.raw
domoticz.sunset.raw
But they all give errors.. any thoughts?
lastupdate and sunset
Moderator: leecollings
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: lastupdate and sunset
Your rule is wrong. There is no rule 'before sunset'. It is 'xxx minutes before sunset' (where xxx is, of course, the amount of minutes). Thing is.. you cannot implement a 'before sunset' because every moment is effective a 'before sunset' moment. There is no defined moment for which this doesn't apply. So, you can use 'at daytime' which is after sunrise and before sunset. Perhaps that is what you mean?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Who is online
Users browsing this forum: No registered users and 1 guest