renemarc/home-assistant-config

View on GitHub
switches/aeotec_zstick.yaml

Summary

Maintainability
Test Coverage
#
# Activate/deactivate Aeotec Z-Stick RGB LED
#
# The Z-Stick USB dongle has a colourful but annoying disco-light status LED.
# Great for diagnosis, but otherwise very bright and obnoxious when placed in
# a visible location!
#
# Todo: Add command_state.
#
# @link https://aeotec.com/z-wave-usb-stick
# @link https://community.home-assistant.io/t/aeotec-gen5-z-stick-strobing-led-question-in-hass-io/28635/9
# @link https://www.home-assistant.io/integrations/command_line/
#
- platform: command_line
  switches:
    aeotec_zstick_disco_light:
      friendly_name: "Aeotec Z-Stick Disco Light"
      command_on: 'echo -e -n "\x01\x08\x00\xF2\x51\x01\x01\x05\x01\x50" > /dev/serial/by-id/usb-0658_0200-if00'
      command_off: 'echo -e -n "\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51" > /dev/serial/by-id/usb-0658_0200-if00'