Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[Home Assistant] Editor shortcuts

All VS Code shortcuts will also work in Home Assistant. I mostly need the following:

TabMove lines to right
Ctrl + Tab (on Linux Mint it’s Shit + Tab)Move lines to left
Ctrl + Alt + Mouse selectionMark area over multiple lines (works only in YAML editor)
Ctrl + Shift + KDelete row
Alt + Arrow key up or downMove row(s) up or down
Alt + Shift + Arrow downDuplicate selected rows
Ctrl + Shit + /Comment line/area

Also, you can simply expand the window you are working in, by clicking on the window title.

[Home Assistant] Open window reminder

This automation is triggered when a window stays open for >10 minutes. It will then send a reminder every 10 minutes (max 6 times).

This post helped me to create this script.

alias: Open window reminder
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_xxx_on_off
    from: 'off'
    to: 'on'
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition: []
action:
  - repeat:
      while:
        - condition: state
          entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_xxx_on_off
          state: 'on'
        - condition: template
          value_template: '{{ repeat.index <= 6 }}'
      sequence:
        - variables:
            counter: '{{ repeat.index * 10 }}'
        - service: telegram_bot.send_message
          data:
            message: Window is open for {{ counter }} minutes
        - delay: '00:10:00'
mode: single