From 53c93652c39d31f0ebcc084fffa8b24fade3a55e Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Sat, 30 Nov 2019 16:56:49 +0100 Subject: [PATCH] LIRC: fix in custom module & new hosts --- .HA_VERSION | 2 +- config_creation/manual_config.yaml | 4 ++++ custom_components/lirc_network/__init__.py | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.HA_VERSION b/.HA_VERSION index be2a06a..e2fd4c7 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -0.100.2 \ No newline at end of file +0.102.3 \ No newline at end of file diff --git a/config_creation/manual_config.yaml b/config_creation/manual_config.yaml index 8972a94..96d322b 100644 --- a/config_creation/manual_config.yaml +++ b/config_creation/manual_config.yaml @@ -130,6 +130,10 @@ lirc_network: port: 2222 - host: bedroompi port: 2222 + - host: esszimmerradio + port: 8765 + - host: musikserverWohnzimmerOben + port: 8765 media_player: diff --git a/custom_components/lirc_network/__init__.py b/custom_components/lirc_network/__init__.py index 50dd57c..f474379 100644 --- a/custom_components/lirc_network/__init__.py +++ b/custom_components/lirc_network/__init__.py @@ -3,10 +3,12 @@ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv -from homeassistant.components.lirc import EVENT_IR_COMMAND_RECEIVED, BUTTON_NAME from homeassistant.const import CONF_HOST, CONF_PORT from ..reconnecting_client import ReconnectingClient +EVENT_IR_COMMAND_RECEIVED = "ir_command_received" +BUTTON_NAME = "button_name" + _LOGGER = logging.getLogger(__name__) DOMAIN = 'lirc_network' REMOTE_NAME = 'remote' @@ -23,8 +25,10 @@ CONFIG_SCHEMA = vol.Schema({ async def async_setup(hass, config): for config_element in config[DOMAIN]: + _LOGGER.warning(f'Connecting to {config_element[CONF_HOST]} at {config_element[CONF_PORT]}') connection = LircConnection(hass, config_element) await connection.start() + _LOGGER.warning("About to return true in async_setup") return True