light-control

command module
v0.0.0-...-8e1d794 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 12 Imported by: 0

README

light-control

Control a light using the Home Assistant Rest API.

I use this in concert with the waybar config in my dotfiles to control a light

Configuration

By default this will attempt to load a configuration file from light-control/config.json under the user configuration directory specified determined by os.UserConfigDir.

It is not required to use this configuration file, as all the information can be alternately passed via the flags specified below.

Usage

Commands
  • light-control Outputs the current state and brightness in a json format compatible with waybar
  • light-control toggle Toggles the light on or off
  • light-control brightness Get the current brightness level as a percentage
  • light-control brightness +10 increase brightness by 10%
  • light-control brightness 10 sets the brightness to 10%
  • light-control brightness -10 decrease brightness by 10%
Flags
  • light-control --config /path/to/config
  • light-control --entity light.ceiling_light
  • light-control --token SOME_TOKEN
  • light-control --host https://example.com

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL