Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Need help to compare date time with a sensor containing date time in binary_sensor

$
0
0

@TheStigh wrote:

Hi,

What I want is to compare today’s date & time with a future date & time (set alarm).
I want this as a binary_sensor to create a true/false.

I’m so stuck at this!
I’ve got this

{{(as_timestamp(now()) | timestamp_custom("%A, %d %h %H:%M")) }}

Result: Friday, 06 Mar 21:12

Then I have this:

{% set timestamp = as_timestamp(states.sensor.arielam30_arielam30_alarm_sensor.attributes.state) | timestamp_custom("%A, %d %h %H:%M") %} {{ timestamp.lstrip("0") }}

Result: Monday, 09 Mar 09:05

Still, have not been able to resolve this…

Here is the sensor

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>