LIRC: fix in custom module & new hosts
This commit is contained in:
parent
5f82f10cfb
commit
53c93652c3
|
@ -1 +1 @@
|
||||||
0.100.2
|
0.102.3
|
|
@ -130,6 +130,10 @@ lirc_network:
|
||||||
port: 2222
|
port: 2222
|
||||||
- host: bedroompi
|
- host: bedroompi
|
||||||
port: 2222
|
port: 2222
|
||||||
|
- host: esszimmerradio
|
||||||
|
port: 8765
|
||||||
|
- host: musikserverWohnzimmerOben
|
||||||
|
port: 8765
|
||||||
|
|
||||||
|
|
||||||
media_player:
|
media_player:
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
import logging
|
import logging
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
import homeassistant.helpers.config_validation as cv
|
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 homeassistant.const import CONF_HOST, CONF_PORT
|
||||||
from ..reconnecting_client import ReconnectingClient
|
from ..reconnecting_client import ReconnectingClient
|
||||||
|
|
||||||
|
EVENT_IR_COMMAND_RECEIVED = "ir_command_received"
|
||||||
|
BUTTON_NAME = "button_name"
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
DOMAIN = 'lirc_network'
|
DOMAIN = 'lirc_network'
|
||||||
REMOTE_NAME = 'remote'
|
REMOTE_NAME = 'remote'
|
||||||
|
@ -23,8 +25,10 @@ CONFIG_SCHEMA = vol.Schema({
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
for config_element in config[DOMAIN]:
|
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)
|
connection = LircConnection(hass, config_element)
|
||||||
await connection.start()
|
await connection.start()
|
||||||
|
_LOGGER.warning("About to return true in async_setup")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue