Files

137 lines
6.0 KiB
JSON

{
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
},
"error": {
"column_invalid": "The column `{column}` is not returned by the query",
"db_url_invalid": "Database URL invalid",
"multiple_queries": "Multiple SQL queries are not supported",
"query_invalid": "SQL query invalid",
"query_no_read_only": "SQL query is not a read-only SELECT query or it's of an unknown type"
},
"step": {
"options": {
"data": {
"column": "Column",
"query": "Select query"
},
"data_description": {
"column": "Column for returned query to present as state",
"query": "Query to run, needs to start with 'SELECT'"
},
"sections": {
"additional_options": {
"data": {
"device_class": "Device class",
"state_class": "State class",
"unit_of_measurement": "Unit of measurement",
"value_template": "Value template"
},
"data_description": {
"device_class": "The type/class of the sensor to set the icon in the frontend",
"state_class": "The state class of the sensor",
"unit_of_measurement": "The unit of measurement for the sensor (optional)",
"value_template": "Template to extract a value from the payload (optional)"
},
"description": "Provide additional configuration to the sensor",
"name": "Additional options"
}
}
},
"user": {
"data": {
"db_url": "Database URL",
"name": "[%key:common::config_flow::data::name%]"
},
"data_description": {
"db_url": "Leave empty to use Home Assistant Recorder database",
"name": "Name that will be used for config entry and also the sensor"
}
}
}
},
"exceptions": {
"db_connection_failed": {
"message": "Failed to connect to the database: {db_url}"
},
"query_execution_error": {
"message": "An error occurred when executing the query: {error}"
},
"query_not_allowed": {
"message": "The provided query is not allowed: {error}"
}
},
"issues": {
"entity_id_query_does_full_table_scan": {
"description": "The query `{query}` contains the keyword `entity_id` but does not reference the `states_meta` table. This will cause a full table scan and database instability. Please check the documentation and use `states_meta.entity_id` instead.",
"title": "SQL query does full table scan"
}
},
"options": {
"error": {
"column_invalid": "[%key:component::sql::config::error::column_invalid%]",
"db_url_invalid": "[%key:component::sql::config::error::db_url_invalid%]",
"multiple_queries": "[%key:component::sql::config::error::multiple_queries%]",
"query_invalid": "[%key:component::sql::config::error::query_invalid%]",
"query_no_read_only": "[%key:component::sql::config::error::query_no_read_only%]"
},
"step": {
"init": {
"data": {
"column": "[%key:component::sql::config::step::options::data::column%]",
"query": "[%key:component::sql::config::step::options::data::query%]"
},
"data_description": {
"column": "[%key:component::sql::config::step::options::data_description::column%]",
"query": "[%key:component::sql::config::step::options::data_description::query%]"
},
"sections": {
"additional_options": {
"data": {
"device_class": "[%key:component::sql::config::step::options::sections::additional_options::data::device_class%]",
"state_class": "[%key:component::sql::config::step::options::sections::additional_options::data::state_class%]",
"unit_of_measurement": "[%key:component::sql::config::step::options::sections::additional_options::data::unit_of_measurement%]",
"value_template": "[%key:component::sql::config::step::options::sections::additional_options::data::value_template%]"
},
"data_description": {
"device_class": "[%key:component::sql::config::step::options::sections::additional_options::data_description::device_class%]",
"state_class": "[%key:component::sql::config::step::options::sections::additional_options::data_description::state_class%]",
"unit_of_measurement": "[%key:component::sql::config::step::options::sections::additional_options::data_description::unit_of_measurement%]",
"value_template": "[%key:component::sql::config::step::options::sections::additional_options::data_description::value_template%]"
},
"description": "[%key:component::sql::config::step::options::sections::additional_options::name%]",
"name": "[%key:component::sql::config::step::options::sections::additional_options::name%]"
}
}
}
}
},
"selector": {
"state_class": {
"options": {
"measurement": "[%key:component::sensor::entity_component::_::state_attributes::state_class::state::measurement%]",
"measurement_angle": "[%key:component::sensor::entity_component::_::state_attributes::state_class::state::measurement_angle%]",
"total": "[%key:component::sensor::entity_component::_::state_attributes::state_class::state::total%]",
"total_increasing": "[%key:component::sensor::entity_component::_::state_attributes::state_class::state::total_increasing%]"
}
}
},
"services": {
"query": {
"description": "Executes a SQL query and returns the result.",
"fields": {
"db_url": {
"description": "The URL of the database to connect to. If not provided, the default Home Assistant recorder database will be used.",
"name": "Database URL"
},
"query": {
"description": "The SELECT query to execute.",
"name": "Query"
}
},
"name": "Query"
}
}
}