Entropy Reduction

Personal log of yet another digital native.


Project maintained by andre-abadi Hosted on GitHub Pages — Theme by mattgraham

Purpose

Reference

Actions

Pictures

printer-light

Observations

Code

ESPHome

switch:
  - platform: gpio
    id: gpio0
    pin:
      number: GPIO0
    name: "${friendly_name} Switch"
    icon: "mdi:desk-lamp"
    inverted: true

Home Assistant Automation

- id: 7b727468-ce4e-41fa-aee8-568b59afc31c
  alias: Printer Sync Light to Switch
  description: ''
  trigger:
    - platform: device
      type: turned_on
      device_id: 82ad57854a15ec84db03742933e390f5
      entity_id: switch.printer
      domain: switch
    - platform: device
      type: turned_off
      device_id: 82ad57854a15ec84db03742933e390f5
      entity_id: switch.printer
      domain: switch
  condition: []
  action:
    - choose:
        - conditions:
            - condition: state
              entity_id: switch.printer
              state: 'on'
          sequence:
            - type: turn_on
              device_id: 2c08f1586defd21fa7184b158ccb49a5
              entity_id: switch.printer_light_switch
              domain: switch
      default:
        - type: turn_off
          device_id: 2c08f1586defd21fa7184b158ccb49a5
          entity_id: switch.printer_light_switch
          domain: switch
  mode: single