WIP init
This commit is contained in:
parent
e087fe1157
commit
60cf0a0f1f
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1 +1,5 @@
|
|||
old/
|
||||
env/
|
||||
build/
|
||||
dist/
|
||||
**/*.egg-info/
|
||||
|
|
14
default.nix
Normal file
14
default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
python3, ...
|
||||
}: python3.pkgs.buildPythonApplication rec {
|
||||
pname = "huecontrol";
|
||||
version = "0.0.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = ./.;
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
bleak
|
||||
rgbxy
|
||||
];
|
||||
}
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1711523803,
|
||||
"narHash": "sha256-UKcYiHWHQynzj6CN/vTcix4yd1eCu1uFdsuarupdCQQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2726f127c15a4cc9810843b96cad73c7eb39e443",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
19
flake.nix
Normal file
19
flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
description = "Control Phillips Hue Bulbs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
sourceCode.url = "path:./src";
|
||||
nixPackageFile.url = "path:./default.nix";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
packages.${system} = {
|
||||
bulbctl = pkgs.callPackage ./. {};
|
||||
default = self.packages.${system}.bulbctl;
|
||||
};
|
||||
};
|
||||
}
|
20
pyproject.toml
Normal file
20
pyproject.toml
Normal file
|
@ -0,0 +1,20 @@
|
|||
[build-system]
|
||||
requires = ["setuptools>=65.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "bulbctl"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
{name="D. Scott Boggs", email="scott@tams.tech"}
|
||||
]
|
||||
description = "Control Phillips Hue light bulbs"
|
||||
|
||||
requires-python = ">=3.11" # this can probably be lowered, we'll see
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3"
|
||||
]
|
||||
dependencies = [
|
||||
"bleak",
|
||||
"rgbxy"
|
||||
]
|
1
src/bulbctl/__init__.py
Normal file
1
src/bulbctl/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
from bleak import BleakClient
|
2
src/bulbctl/bulb.py
Normal file
2
src/bulbctl/bulb.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
from bleak import BleakClient
|
||||
from rgbxy import Converter, GamutC, get_light_gamut
|
6
src/bulbctl/config.py
Normal file
6
src/bulbctl/config.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# from libhueble
|
||||
|
||||
class Config:
|
||||
lamps: Lamp
|
Loading…
Reference in a new issue