mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Update service domain for mysensors from 'switch' to 'mysensor… (#29147)
This commit is contained in:
committed by
Franck Nijhof
parent
2d2ab452ca
commit
c80f284ca4
@@ -6,8 +6,9 @@ from homeassistant.components import mysensors
|
||||
from homeassistant.components.switch import DOMAIN, SwitchDevice
|
||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_OFF, STATE_ON
|
||||
|
||||
from .const import DOMAIN as MYSENSORS_DOMAIN, SERVICE_SEND_IR_CODE
|
||||
|
||||
ATTR_IR_CODE = "V_IR_SEND"
|
||||
SERVICE_SEND_IR_CODE = "mysensors_send_ir_code"
|
||||
|
||||
SEND_IR_CODE_SERVICE_SCHEMA = vol.Schema(
|
||||
{vol.Optional(ATTR_ENTITY_ID): cv.entity_ids, vol.Required(ATTR_IR_CODE): cv.string}
|
||||
@@ -64,7 +65,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
await device.async_turn_on(**kwargs)
|
||||
|
||||
hass.services.async_register(
|
||||
DOMAIN,
|
||||
MYSENSORS_DOMAIN,
|
||||
SERVICE_SEND_IR_CODE,
|
||||
async_send_ir_code_service,
|
||||
schema=SEND_IR_CODE_SERVICE_SCHEMA,
|
||||
|
||||
Reference in New Issue
Block a user