#Wake up light, hall light and Fingerbot

1 messages Β· Page 1 of 1 (latest)

queen compass
#

Hello,
can you help me with some automations?

  1. I tried making an automation that turns on my bedside light 15 minutes before alarm, but it does not work.
    Any idea why? It just didn't do anything.
alias: TRETAKT Pre-Alarm Light
description: ""
triggers:
  - value_template: >-
      {{ (states('sensor.pixel_8_pro_next_alarm') | int(0)) -
      (as_timestamp(now()) * 1000) <= 900000 }}
    trigger: template
conditions: []
actions:
  - target:
      device_id: TRETAKT_ID
    action: switch.turn_on
    data: {}
  - delay: "00:02:00"
  - target:
      device_id: TRETAKT_ID
    action: switch.turn_off
    data: {}
mode: single
  1. Also, would it be possible to have a hall light and either with it's built-in motion sensor or using external motion sensor, it would turn on, but:
  • only turn on when it's dim (light sensor? or pre-defined timeframe?)
    • otherwise during the day stay off
  • turn on with lower brightness during the night
  1. I bought some fingerbots and haven't got them as of yet - I am hoping that I can chain my TRETAKT power switch with the Fingerbot:
  • manually press button on my phone
  • which turns on TRETAKT
  • and Fingerbot clicks with 5 seconds delay after TRETAKT

Thanks a lot

lime jasper
#

if you go into the automation and click the traces button, are there any traces there_

queen compass
lime jasper
#

the sensor just reports when you have the next alarm set, it shouldnt be an issue unless you set your alarm up 15 minutes before you want it to go off πŸ˜…

queen compass
#

I setup the alarm 16 minutes from now, waited and it didnt work.

lime jasper
#

is your template right? usually alarms are as datetime, you cant just datetime|int

queen compass
#

It should report timestamp in milliseconds.

lime jasper
#

thats not how its formatted by default

queen compass
#

I hardcoded timecode in place of the sensor and it worked.

lime jasper
#

yes because the sensor is in datetime format

queen compass
#

Not sure what you mean

lime jasper
#

2025-03-23T22:26:00+00:00

#

this is datetime format

queen compass
#

And how was I supposed to know that? 😭

#

Sensor shows millisecodns in settings

lime jasper
#

i just told you 3 times πŸ˜…

queen compass
#

My question still stands.

#

The docs for next_alarm say milliseconds

#

I want to understand it, so in future I dont have to ask here every time.

lime jasper
#

there is perhaps a more elegant way to do this, but remove |int(0) and add |as_timestamp to &both* the alarm time and now()

lime jasper
#

i see the confusion

queen compass
#

hmmm, this won't work I think anyway. I would have to use 1-minute interval updates to make this realiable. It will probably drain the battery.

lime jasper
#

Time in Mikliseconds is an attribute that displays the time in milliseconds

#

the state of the entity is not in millisecods

lime jasper
#

thats the update interval of the sensor which again, as long as you arent setting your alarm less than 15 minute before you want it to go off will never be an issue

queen compass
lime jasper
#

yeah πŸ˜…

queen compass
queen compass
#

This only leaves my two other questions:

  1. Also, would it be possible to have a hall light and either with it's built-in motion sensor or using external motion sensor, it would turn on, but:
  • only turn on when it's dim (light sensor? or pre-defined timeframe?)
    • otherwise during the day stay off
  • turn on with lower brightness during the night
  1. I bought some fingerbots and haven't got them as of yet - I am hoping that I can chain my TRETAKT power switch with the Fingerbot:
  • manually press button on my phone
  • which turns on TRETAKT
  • and Fingerbot clicks with 5 seconds delay after TRETAKT
lime jasper
#
  1. yes, you just need to use conditions
#
  1. use an automation or script that does the first action, then a delay, then the 2nd action
queen compass
#

Hello, the Fingerbots arrived. They report their state for some reason (ON/OFF)
Can that be changed to be just a toggle?

Also, what is this? (translated: FLASE ? TRUE)