* Add logbook and device trigger platforms to Shelly Add `logbook` platform for describing “shelly.click” event Add `device_trigger` platform for adding automation based on click events: Example of logbook event: Shelly 'single' click event for Test I3 channel 3 was fired. (Test I3 is the name of the device) Example of automation triggers: First button triple clicked First button long clicked and then single clicked First button double clicked First button long clicked First button single clicked and then long clicked First button single clicked Second button triple clicked .. Second button single clicked * Fix codespell * Remove pylint added for debug * Add tests * Rebase * Fix Rebase & Apply PR review suggestions Fix tests after rebasing Use `INPUTS_EVENTS_DICT` for input triggers Apply PR suggestions
48 lines
1.7 KiB
JSON
48 lines
1.7 KiB
JSON
{
|
|
"config": {
|
|
"flow_title": "{name}",
|
|
"step": {
|
|
"user": {
|
|
"description": "Before set up, battery-powered devices must be woken up by pressing the button on the device.",
|
|
"data": {
|
|
"host": "[%key:common::config_flow::data::host%]"
|
|
}
|
|
},
|
|
"credentials": {
|
|
"data": {
|
|
"username": "[%key:common::config_flow::data::username%]",
|
|
"password": "[%key:common::config_flow::data::password%]"
|
|
}
|
|
},
|
|
"confirm_discovery": {
|
|
"description": "Do you want to set up the {model} at {host}?\n\nBefore set up, battery-powered devices must be woken up by pressing the button on the device."
|
|
}
|
|
},
|
|
"error": {
|
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
|
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
|
"unknown": "[%key:common::config_flow::error::unknown%]"
|
|
},
|
|
"abort": {
|
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
|
"unsupported_firmware": "The device is using an unsupported firmware version."
|
|
}
|
|
},
|
|
"device_automation":{
|
|
"trigger_subtype": {
|
|
"button": "Button",
|
|
"button1": "First button",
|
|
"button2": "Second button",
|
|
"button3": "Third button"
|
|
},
|
|
"trigger_type": {
|
|
"single": "{subtype} single clicked",
|
|
"double": "{subtype} double clicked",
|
|
"triple": "{subtype} triple clicked",
|
|
"long": " {subtype} long clicked",
|
|
"single_long": "{subtype} single clicked and then long clicked",
|
|
"long_single": "{subtype} long clicked and then single clicked"
|
|
}
|
|
}
|
|
}
|