* Add NASweb integration * Fix DeviceInfo import * Remove commented out code * Change class name for uniquness * Drop CoordinatorEntity inheritance * Rename class Output to more descriptive: RelaySwitch * Update required webio-api version * Implement on-the-fly addition/removal of entities * Set coordinator name matching device name * Set entities with too old status as unavailable * Drop Optional in favor of modern typing * Fix spelling of a variable * Rename commons to more fitting name: helper * Remove redundant code * Let unload fail when there is no coordinator * Fix bad docstring * Rename cord to coordinator for clarity * Remove default value for pop and let it raise exception * Drop workaround and use get_url from helper.network * Use webhook to send data from device * Deinitialize coordinator when no longer needed * Use Python formattable string * Use dataclass to store integration data in hass.data * Raise ConfigEntryNotReady when appropriate * Refactor NASwebData class * Move RelaySwitch to switch.py * Fix ConfigFlow tests * Create issues when entry fails to load * Respond when correctly received status update * Depend on webhook instead of http * Create issue when status is not received during entry set up * Make issue_id unique across integration entries * Remove unnecessary initializations * Inherit CoordinatorEntity to avoid code duplication * Optimize property access via assignment in __init__ * Use preexisting mechanism to fill schema with user input * Fix translation strings * Handle unavailable or unreachable internal url * Implement custom coordinator for push driven data updates * Move module-specific constants to respective modules * Fix requirements_all.txt * Fix CODEOWNERS file * Raise ConfigEntryError instead of issue creation * Fix entity registry import * Use HassKey as key in hass.data * Use typed ConfigEntry * Store runtime data in config entry * Rewrite to be more Pythonic * Move add/remove of switch entities to switch.py * Skip unnecessary check * Remove unnecessary type hints * Remove unnecessary nonlocal * Use a more descriptive docstring * Add docstrings to NASwebCoordinator * Fix formatting * Use correct return type * Fix tests to align with changed code * Remove commented code * Use serial number as config entry id * Catch AbortFlow exception * Update tests to check ConfigEntry Unique ID * Remove unnecessary form abort
50 lines
2.4 KiB
JSON
50 lines
2.4 KiB
JSON
{
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"title": "Add NASweb device",
|
|
"description": "{nasweb_schema_img}NASweb combines the functions of a control panel and the ability to manage building automation. The device monitors the flow of information from sensors and programmable switches and stores settings, definitions and configured actions.",
|
|
"data": {
|
|
"host": "[%key:common::config_flow::data::host%]",
|
|
"username": "[%key:common::config_flow::data::username%]",
|
|
"password": "[%key:common::config_flow::data::password%]"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
|
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
|
|
"missing_internal_url": "Make sure Home Assistant has valid internal url",
|
|
"missing_nasweb_data": "Something isn't right with device internal configuration. Try restarting the device and HomeAssistant.",
|
|
"missing_status": "Did not received any status updates within the expected time window. Make sure the Home Assistant Internal URL is reachable from the NASweb device.",
|
|
"unknown": "[%key:common::config_flow::error::unknown%]"
|
|
},
|
|
"abort": {
|
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
|
}
|
|
},
|
|
"exceptions": {
|
|
"config_entry_error_invalid_authentication": {
|
|
"message": "Invalid username/password. Most likely user changed password or was removed. Delete this entry and create new one with correct username/password."
|
|
},
|
|
"config_entry_error_internal_error": {
|
|
"message": "Something isn't right with device internal configuration. Try restarting the device and HomeAssistant. If the issue persists contact support at {support_email}"
|
|
},
|
|
"config_entry_error_no_status_update": {
|
|
"message": "Did not received any status updates within the expected time window. Make sure the Home Assistant Internal URL is reachable from the NASweb device. If the issue persists contact support at {support_email}"
|
|
},
|
|
"config_entry_error_missing_internal_url": {
|
|
"message": "[%key:component::nasweb::config::error::missing_internal_url%]"
|
|
},
|
|
"serial_mismatch": {
|
|
"message": "Connected to different NASweb device (serial number mismatch)."
|
|
}
|
|
},
|
|
"entity": {
|
|
"switch": {
|
|
"switch_output": {
|
|
"name": "Relay Switch {index}"
|
|
}
|
|
}
|
|
}
|
|
}
|