Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sian-Lee-SA committed Dec 1, 2023
2 parents 1f7f0f0 + eaa062c commit 0f8921e
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 10 deletions.
4 changes: 2 additions & 2 deletions custom_components/switch_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .schema import BLUEPRINT_MQTT_SCHEMA, BLUEPRINT_EVENT_SCHEMA, SERVICE_SET_VARIABLES_SCHEMA
from .connections import async_setup_connections
from homeassistant.core import Config, HomeAssistant, callback
from homeassistant.config import _format_config_error
from homeassistant.config import format_schema_error
from homeassistant.helpers import issue_registry as ir

async def async_setup( hass: HomeAssistant, config: Config ):
Expand Down Expand Up @@ -90,7 +90,7 @@ async def _init_blueprints( hass: HomeAssistant ):
try:
c_validated = BLUEPRINT_MQTT_SCHEMA(config.get('data')) if config.get('data').get('event_type') == 'mqtt' else BLUEPRINT_EVENT_SCHEMA(config.get('data'))
except vol.Invalid as ex:
LOGGER.error(_format_config_error(ex, f"{DOMAIN} {CONF_BLUEPRINTS}({config.get('id')})", config))
LOGGER.error(format_schema_error(hass, ex, f"{DOMAIN} {CONF_BLUEPRINTS}({config.get('id')})", config))
continue
if len(c_validated.get('buttons')) == 1:
button = c_validated.get('buttons')[0]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Inovelli VZM31-SN Blue Series 2-1 Switch
name: Inovelli VZM31-SN or VZM35-SN Blue Series 2-1 Switch
service: ZHA
event_type: zha_event
identifier_key: device_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ buttons:
- title: press
conditions:
- key: payload
value: play_pause
value: toggle
- title: press 2x
conditions:
- key: payload
value: skip_forward
value: brightness_step_up
- title: press 3x
conditions:
- key: payload
value: skip_backward
value: brightness_step_down
- title: rotate left
conditions:
- key: payload
value: rotate_left
value: brightness_move_down
- title: rotate right
conditions:
- key: payload
value: rotate_right
value: brightness_move_up
- title: rotate (stopped)
conditions:
- key: payload
value: rotate_stop
value: brightness_stop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Inovelli VZM31-SN Blue Series 2-1 Switch
name: Inovelli VZM31-SN or VZM35-SN Blue Series 2-1 Switch
service: Zigbee2MQTT
event_type: mqtt
mqtt_topic_format: zigbee2mqtt/+/action
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Philips Hue Wall Switch Module
service: Zigbee2MQTT
event_type: mqtt
mqtt_topic_format: zigbee2mqtt/+/action
info: Actions HOLD and HOLD (RELEASED) will only work in rocker mode.
buttons:
- x: 112
y: 140
width: 88
height: 88
actions:
- title: init
conditions:
- key: payload
value: left_press
- title: press
conditions:
- key: payload
value: left_press_release
- title: hold
conditions:
- key: payload
value: left_hold

- x: 112
y: 270
width: 88
height: 88
actions:
- title: init
conditions:
- key: payload
value: right_press
- title: press
conditions:
- key: payload
value: right_press_release
- title: hold
conditions:
- key: payload
value: right_hold

0 comments on commit 0f8921e

Please sign in to comment.