2022-04-24 20:50:32 +02:00
{
"config" : {
"abort" : {
"already_configured" : "[%key:common::config_flow::abort::already_configured_account%]"
} ,
"error" : {
2025-10-28 10:33:10 +01:00
"column_invalid" : "The column `{column}` is not returned by the query" ,
2022-04-24 20:50:32 +02:00
"db_url_invalid" : "Database URL invalid" ,
2023-12-27 13:58:35 -03:00
"multiple_queries" : "Multiple SQL queries are not supported" ,
2025-10-28 10:33:10 +01:00
"query_invalid" : "SQL query invalid" ,
2025-11-06 17:11:46 +01:00
"query_no_read_only" : "SQL query is not a read-only SELECT query or it's of an unknown type"
2022-04-24 20:50:32 +02:00
} ,
"step" : {
2025-09-11 12:27:48 +02:00
"options" : {
"data" : {
2025-10-28 10:33:10 +01:00
"column" : "Column" ,
"query" : "Select query"
2025-09-11 12:27:48 +02:00
} ,
"data_description" : {
2025-10-28 10:33:10 +01:00
"column" : "Column for returned query to present as state" ,
"query" : "Query to run, needs to start with 'SELECT'"
2025-09-11 12:27:48 +02:00
} ,
"sections" : {
"advanced_options" : {
"data" : {
"device_class" : "Device class" ,
2025-10-28 10:33:10 +01:00
"state_class" : "State class" ,
"unit_of_measurement" : "Unit of measurement" ,
"value_template" : "Value template"
2025-09-11 12:27:48 +02:00
} ,
"data_description" : {
"device_class" : "The type/class of the sensor to set the icon in the frontend" ,
2025-10-28 10:33:10 +01:00
"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"
2025-09-11 12:27:48 +02:00
}
2022-04-24 20:50:32 +02:00
}
2025-10-28 10:33:10 +01:00
} ,
"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"
}
2022-04-24 20:50:32 +02:00
}
}
} ,
2025-10-23 02:08:37 -07:00
"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}"
}
} ,
2025-10-28 10:33:10 +01:00
"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"
2025-10-23 02:08:37 -07:00
}
} ,
2022-04-24 20:50:32 +02:00
"options" : {
2025-10-28 10:33:10 +01:00
"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%]"
} ,
2022-04-24 20:50:32 +02:00
"step" : {
"init" : {
"data" : {
2025-10-28 10:33:10 +01:00
"column" : "[%key:component::sql::config::step::options::data::column%]" ,
"query" : "[%key:component::sql::config::step::options::data::query%]"
2022-04-24 20:50:32 +02:00
} ,
"data_description" : {
2025-10-28 10:33:10 +01:00
"column" : "[%key:component::sql::config::step::options::data_description::column%]" ,
"query" : "[%key:component::sql::config::step::options::data_description::query%]"
2025-09-11 12:27:48 +02:00
} ,
"sections" : {
"advanced_options" : {
"data" : {
"device_class" : "[%key:component::sql::config::step::options::sections::advanced_options::data::device_class%]" ,
2025-10-28 10:33:10 +01:00
"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%]"
2025-09-11 12:27:48 +02:00
} ,
"data_description" : {
"device_class" : "[%key:component::sql::config::step::options::sections::advanced_options::data_description::device_class%]" ,
2025-10-28 10:33:10 +01:00
"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%]"
2025-09-11 12:27:48 +02:00
}
2022-04-24 20:50:32 +02:00
}
}
}
2023-04-07 16:32:36 -10:00
} ,
2023-07-08 16:00:22 -03:00
"selector" : {
"device_class" : {
"options" : {
2025-08-01 21:33:47 +02:00
"absolute_humidity" : "[%key:component::sensor::entity_component::absolute_humidity::name%]" ,
2023-07-08 16:00:22 -03:00
"apparent_power" : "[%key:component::sensor::entity_component::apparent_power::name%]" ,
"aqi" : "[%key:component::sensor::entity_component::aqi::name%]" ,
2025-08-01 21:33:47 +02:00
"area" : "[%key:component::sensor::entity_component::area::name%]" ,
2023-07-08 16:00:22 -03:00
"atmospheric_pressure" : "[%key:component::sensor::entity_component::atmospheric_pressure::name%]" ,
"battery" : "[%key:component::sensor::entity_component::battery::name%]" ,
2025-08-01 21:33:47 +02:00
"blood_glucose_concentration" : "[%key:component::sensor::entity_component::blood_glucose_concentration::name%]" ,
2023-07-08 16:00:22 -03:00
"carbon_dioxide" : "[%key:component::sensor::entity_component::carbon_dioxide::name%]" ,
2024-07-01 02:44:59 -03:00
"carbon_monoxide" : "[%key:component::sensor::entity_component::carbon_monoxide::name%]" ,
"conductivity" : "[%key:component::sensor::entity_component::conductivity::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2024-07-01 02:44:59 -03:00
"date" : "[%key:component::sensor::entity_component::date::name%]" ,
2023-07-08 16:00:22 -03:00
"distance" : "[%key:component::sensor::entity_component::distance::name%]" ,
2024-07-01 02:44:59 -03:00
"duration" : "[%key:component::sensor::entity_component::duration::name%]" ,
2023-07-08 16:00:22 -03:00
"energy" : "[%key:component::sensor::entity_component::energy::name%]" ,
2025-08-01 21:33:47 +02:00
"energy_distance" : "[%key:component::sensor::entity_component::energy_distance::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2023-07-23 18:49:10 +02:00
"ph" : "[%key:component::sensor::entity_component::ph::name%]" ,
2023-07-08 16:00:22 -03:00
"pm1" : "[%key:component::sensor::entity_component::pm1::name%]" ,
"pm10" : "[%key:component::sensor::entity_component::pm10::name%]" ,
"pm25" : "[%key:component::sensor::entity_component::pm25::name%]" ,
2025-10-28 10:33:10 +01:00
"pm4" : "[%key:component::sensor::entity_component::pm4::name%]" ,
2023-07-08 16:00:22 -03:00
"power" : "[%key:component::sensor::entity_component::power::name%]" ,
2024-07-01 02:44:59 -03:00
"power_factor" : "[%key:component::sensor::entity_component::power_factor::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2025-05-15 13:05:46 +02:00
"reactive_energy" : "[%key:component::sensor::entity_component::reactive_energy::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2025-11-16 15:00:51 +01:00
"temperature_delta" : "[%key:component::sensor::entity_component::temperature_delta::name%]" ,
2023-07-08 16:00:22 -03:00
"timestamp" : "[%key:component::sensor::entity_component::timestamp::name%]" ,
"volatile_organic_compounds" : "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]" ,
2025-08-01 21:33:47 +02:00
"volatile_organic_compounds_parts" : "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]" ,
2023-07-08 16:00:22 -03:00
"voltage" : "[%key:component::sensor::entity_component::voltage::name%]" ,
"volume" : "[%key:component::sensor::entity_component::volume::name%]" ,
2024-07-01 02:44:59 -03:00
"volume_flow_rate" : "[%key:component::sensor::entity_component::volume_flow_rate::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2025-08-01 21:33:47 +02:00
"wind_direction" : "[%key:component::sensor::entity_component::wind_direction::name%]" ,
2023-07-08 16:00:22 -03:00
"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%]" ,
2025-05-26 21:22:10 +02:00
"measurement_angle" : "[%key:component::sensor::entity_component::_::state_attributes::state_class::state::measurement_angle%]" ,
2023-07-08 16:00:22 -03:00
"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%]"
}
}
} ,
2025-10-28 10:33:10 +01:00
"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"
2023-04-07 16:32:36 -10:00
}
2022-04-24 20:50:32 +02:00
}
}