Baby bottle warmer with sliders

Hello,

I would like to share my baby bottle warmer automation, might not be that complicated, but it sure is handy! (high WAF)
I used:

Automation:

  • I prepare 200ml baby milk in the baby bottle warmer after cleaning kitchen after dinner.
  • I am upstairs sleeping or chilling in bed and enable the bottle warmer from my bed at midnight (when we want to feed the baby).
  • I can change the time with sliders minutes and seconds, depending on amount of milk and requirement (our baby does not like it that hot).
  • I receive a notification that it happend (start and end) and the kitchen light spots will turn on, so that I can grab the bottle. After-which it will turn off after 3 min.

Dutch to ENG:
fleswarmer = Bottlewarmer
waterkoker = kettle
minuten = minutes
seconden = seconds

Capture

For the configuration.yaml:

Switch:
  - platform: mqtt
    name: "fleswarmer"
    state_topic: "home/midden/keuken/waterkoker"
    command_topic: "home/midden/keuken/waterkoker/set"
    payload_off: "0"
    payload_on: "1"
    qos: 1

  - platform: mqtt
    name: "keuken spots"
    state_topic: "home/midden/keuken/spots"
    command_topic: "home/midden/keuken/spots/set"
    payload_off: "0"
    payload_on: "1"
    qos: 1

# sliders
input_number:
  flesopwarmenmin:
    name: Fles opwarm minuten
    icon: mdi:clock-start
    initial: 3
    min: 0
    max: 6
    step: 1
    
  flesopwarmensec:
    name: Fles opwarm seconden
    icon: mdi:clock-start
    initial: 30
    min: 0
    max: 60
    step: 10

Automation:

##################### fles warmer aan voor periode van slider tijd
 - alias: flessenwarmer uit
   trigger:
     platform: state
     entity_id: switch.fleswarmer
     to: 'on'
   action:
     - service: notify.pushbullet
       data:
        message: "Fles verwarming aan"
     - delay: '00:{{ states.input_number.flesopwarmenmin.state | int }}:{{ states.input_number.flesopwarmensec.state | int }}'
     - service: switch.turn_off
       entity_id: switch.fleswarmer
     - service: notify.pushbullet
       data:
        message: "Baby fles klaar"
     - service: switch.turn_on
       entity_id: switch.keuken_spots
     - delay: '00:03:00'
     - service: switch.turn_off
       entity_id: switch.keuken_spots

I put it all together in groups.yaml:

  default_view:
    view: yes
    icon: mdi:lightbulb-on-outline
    entities:
      - group.keuken
      - group.woonkamer
      - group.baby

  baby:
    name: Baby flessenwarmer
    entities:
      - switch.fleswarmer
      - input_number.flesopwarmenmin
      - input_number.flesopwarmensec
7 Likes

Using the input.number in a delay in an automation took me some time, if only the documentation had an example on that…
So I opened a pull request.

In the text between {{}} there is ‘int’
I assume this stands for integer, so i made the sliders integers by setting the step to be a whole number.
But I would also be fine with 3,5 minutes, being 3 minutes and 30 seconds, with only 1 slider.
The input.numbers are floats and support that, but would probably give problems with the delay.
That is why I used 2 sliders.
There probably is a way to convert the 3,5 to 3:30, but is there a simple way in Hass.io to achieve this?

@bvansambeek as a new father thank you!
This automation has saved me over cooking a few batches already.

1 Like