{ "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": { "advanced_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": "Advanced 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" }, "platform_yaml_not_supported": { "description": "Platform YAML setup is not supported.\nChange from configuring it in the `sensor:` key to using the `sql:` key directly in configuration.yaml.\nTo see the detailed documentation, select Learn more.", "title": "Platform YAML is not supported in SQL" } }, "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": { "advanced_options": { "data": { "device_class": "[%key:component::sql::config::step::options::sections::advanced_options::data::device_class%]", "state_class": "[%key:component::sql::config::step::options::sections::advanced_options::data::state_class%]", "unit_of_measurement": "[%key:component::sql::config::step::options::sections::advanced_options::data::unit_of_measurement%]", "value_template": "[%key:component::sql::config::step::options::sections::advanced_options::data::value_template%]" }, "data_description": { "device_class": "[%key:component::sql::config::step::options::sections::advanced_options::data_description::device_class%]", "state_class": "[%key:component::sql::config::step::options::sections::advanced_options::data_description::state_class%]", "unit_of_measurement": "[%key:component::sql::config::step::options::sections::advanced_options::data_description::unit_of_measurement%]", "value_template": "[%key:component::sql::config::step::options::sections::advanced_options::data_description::value_template%]" }, "description": "[%key:component::sql::config::step::options::sections::advanced_options::name%]", "name": "[%key:component::sql::config::step::options::sections::advanced_options::name%]" } } } } }, "selector": { "device_class": { "options": { "absolute_humidity": "[%key:component::sensor::entity_component::absolute_humidity::name%]", "apparent_power": "[%key:component::sensor::entity_component::apparent_power::name%]", "aqi": "[%key:component::sensor::entity_component::aqi::name%]", "area": "[%key:component::sensor::entity_component::area::name%]", "atmospheric_pressure": "[%key:component::sensor::entity_component::atmospheric_pressure::name%]", "battery": "[%key:component::sensor::entity_component::battery::name%]", "blood_glucose_concentration": "[%key:component::sensor::entity_component::blood_glucose_concentration::name%]", "carbon_dioxide": "[%key:component::sensor::entity_component::carbon_dioxide::name%]", "carbon_monoxide": "[%key:component::sensor::entity_component::carbon_monoxide::name%]", "conductivity": "[%key:component::sensor::entity_component::conductivity::name%]", "current": "[%key:component::sensor::entity_component::current::name%]", "data_rate": "[%key:component::sensor::entity_component::data_rate::name%]", "data_size": "[%key:component::sensor::entity_component::data_size::name%]", "date": "[%key:component::sensor::entity_component::date::name%]", "distance": "[%key:component::sensor::entity_component::distance::name%]", "duration": "[%key:component::sensor::entity_component::duration::name%]", "energy": "[%key:component::sensor::entity_component::energy::name%]", "energy_distance": "[%key:component::sensor::entity_component::energy_distance::name%]", "energy_storage": "[%key:component::sensor::entity_component::energy_storage::name%]", "frequency": "[%key:component::sensor::entity_component::frequency::name%]", "gas": "[%key:component::sensor::entity_component::gas::name%]", "humidity": "[%key:component::sensor::entity_component::humidity::name%]", "illuminance": "[%key:component::sensor::entity_component::illuminance::name%]", "irradiance": "[%key:component::sensor::entity_component::irradiance::name%]", "moisture": "[%key:component::sensor::entity_component::moisture::name%]", "monetary": "[%key:component::sensor::entity_component::monetary::name%]", "nitrogen_dioxide": "[%key:component::sensor::entity_component::nitrogen_dioxide::name%]", "nitrogen_monoxide": "[%key:component::sensor::entity_component::nitrogen_monoxide::name%]", "nitrous_oxide": "[%key:component::sensor::entity_component::nitrous_oxide::name%]", "ozone": "[%key:component::sensor::entity_component::ozone::name%]", "ph": "[%key:component::sensor::entity_component::ph::name%]", "pm1": "[%key:component::sensor::entity_component::pm1::name%]", "pm10": "[%key:component::sensor::entity_component::pm10::name%]", "pm25": "[%key:component::sensor::entity_component::pm25::name%]", "pm4": "[%key:component::sensor::entity_component::pm4::name%]", "power": "[%key:component::sensor::entity_component::power::name%]", "power_factor": "[%key:component::sensor::entity_component::power_factor::name%]", "precipitation": "[%key:component::sensor::entity_component::precipitation::name%]", "precipitation_intensity": "[%key:component::sensor::entity_component::precipitation_intensity::name%]", "pressure": "[%key:component::sensor::entity_component::pressure::name%]", "reactive_energy": "[%key:component::sensor::entity_component::reactive_energy::name%]", "reactive_power": "[%key:component::sensor::entity_component::reactive_power::name%]", "signal_strength": "[%key:component::sensor::entity_component::signal_strength::name%]", "sound_pressure": "[%key:component::sensor::entity_component::sound_pressure::name%]", "speed": "[%key:component::sensor::entity_component::speed::name%]", "sulphur_dioxide": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]", "temperature": "[%key:component::sensor::entity_component::temperature::name%]", "timestamp": "[%key:component::sensor::entity_component::timestamp::name%]", "volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]", "volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]", "voltage": "[%key:component::sensor::entity_component::voltage::name%]", "volume": "[%key:component::sensor::entity_component::volume::name%]", "volume_flow_rate": "[%key:component::sensor::entity_component::volume_flow_rate::name%]", "volume_storage": "[%key:component::sensor::entity_component::volume_storage::name%]", "water": "[%key:component::sensor::entity_component::water::name%]", "weight": "[%key:component::sensor::entity_component::weight::name%]", "wind_direction": "[%key:component::sensor::entity_component::wind_direction::name%]", "wind_speed": "[%key:component::sensor::entity_component::wind_speed::name%]" } }, "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" } } }