diff --git a/huecli/__main__.py b/huecli/__main__.py index b6146e7..9bfa9af 100644 --- a/huecli/__main__.py +++ b/huecli/__main__.py @@ -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]) diff --git a/pyproject.toml b/pyproject.toml index 7c4249b..496e01b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT"