diff --git a/docker2mqtt/docker2mqtt.py b/docker2mqtt/docker2mqtt.py index ea16b5e..4610950 100755 --- a/docker2mqtt/docker2mqtt.py +++ b/docker2mqtt/docker2mqtt.py @@ -254,6 +254,7 @@ def __init__(self, cfg: Docker2MqttConfig, do_not_exit: bool = False): { "name": container_status["Names"], "image": container_status["Image"], + "host": cfg['docker2mqtt_hostname'], "status": status_str, "state": state_str, } diff --git a/docker2mqtt/type_definitions.py b/docker2mqtt/type_definitions.py index 753734f..456a10b 100644 --- a/docker2mqtt/type_definitions.py +++ b/docker2mqtt/type_definitions.py @@ -82,6 +82,8 @@ class ContainerEvent(TypedDict): The name of the container image The image the container is running + host + The host the container is running on status The docker status the container is in state @@ -91,6 +93,7 @@ class ContainerEvent(TypedDict): name: str image: str + host: str status: ContainerEventStatusType state: ContainerEventStateType