Add version command
This commit is contained in:
parent
5c12b69409
commit
365b2d6857
@ -1,3 +1,4 @@
|
||||
import importlib.metadata
|
||||
import os
|
||||
from enum import Enum
|
||||
from typing import NamedTuple
|
||||
@ -173,6 +174,14 @@ def set_brightness(
|
||||
payload = json.dumps({"brightness": brightness})
|
||||
pub.single(topic, payload, hostname=get_mqtt_broker())
|
||||
|
||||
@app.command()
|
||||
def version():
|
||||
"""
|
||||
Print huecli version
|
||||
"""
|
||||
version = importlib.metadata.version("huecli")
|
||||
typer.echo(f"huecli {version}")
|
||||
|
||||
def parse_color(color: str) -> XYColor:
|
||||
if color in COLOR_MAP:
|
||||
return XYColor(COLOR_MAP[color][0], COLOR_MAP[color][1])
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "huecli"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
description = "Set Philips Hue lights using MQTT"
|
||||
authors = ["Torjus Håkestad <torjus@uio.no>"]
|
||||
license = "MIT"
|
||||
|
Loading…
Reference in New Issue
Block a user