from automation.yaml
Publish the alarm time hours when it has changed.
- alias: MQTT TimeSlider Hours
trigger:
- platform: state
entity_id: input_number.alarmtimehrs
action:
- service: mqtt.publish
data_template:
topic: "cmnd/MQTTSliderSaveHrs"
retain: true
payload_template: '{{states.input_number.alarmtime.state | int}}' <------ this may need to be changed or you may be able to use the new input.date_time - doing it this way you would need to do the same for the minutes
The following sets the Alarm time hours from the MQTT that is received when HA resets…
You will have to modify this to your own use case.
I don’t know why the other way (that I showed above) would not work except that you would need to change every use of input_slider to input_number in the yaml and the python code.
@masterkenobi i follow your alarm on github.
I use hass.io but when i restart home assistant i lost the values hour and minutos. The values not stored. I think the solution is what @keithh666 said.
@masterkenobi thanks mate.
now it Works, but with one BIG problem.
if you delete home-assistant.log and home-assistant_v2.db all the sliders values are deleted and not stored. @dale3h had the big solution for this, using MQTT.
I don’t need any input selectors in the frontend nor do I need different radio stations.
I just want to use voice input for setting up the alarm.
Here is my first approach but that one is missing a few things: Set up a radio alarm timer with IFTTT
How can I accomplish it?
Maybe not the right place to post this… But I will try anyway
I need some help with the creation of a car heater function (Living in Sweden) and winter is coming
I have an outside temp sensor and a switch to connect to the heater in my car.
If the temperature is < 10 i want the heater to start 30 minutes before the actual time to leave.
If the temperature is < 0 i want the heater to start 60 minutes before the actual time to leave.
If the temperature is < -10 i want the heater to start 90 minutes before the actual time to leave.
I also want the heater to run for 30 min after the actual time to leave (if I am late).
It would also be great if it could be started/stopped manually.
I have searched the forum for this, but with no luck…
My goal is to have “sunrise” alarm clocks using smart led bulbs for all 6 of us in my family. So, there’s a lot of variables involved - different lights at different times on different days. And, eventually the reverse where some lights get gradually dimmer at night (for the younger kids)
When I first looked into smart lights I looked into MiLights and really liked what the guy in this link did: http://iqjar.com/jar/wake-up-gently-to-gradually-increasing-light/
He made a function (script? automation?) for the the gradual light increase, then he calls it at set times using Cron. However in my case I would need to pass a parameter of which light I was referring too.
I decided not to go the MiLight route because I didn’t like the four zone limit, which brought me to Home Assistant.
I think from reading this page I can figure out how to assign the times & days. But is it possible to create something (script? automation? effect?) to contain how to do the sunrise effect then call it at a specific time and pass a parameter of which light?