Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL] sensors added #2092

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions sentences/sl/sensor_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,81 @@ intents:
device_class: volatile_organic_compounds_parts
expansion_rules:
class: "([kocentracija|stopnja|indeks] (VOC[ja]|[hlapljiv(ih|e)] organsk(e|ih) spojin[e]))"

# Voltage
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: voltage
slots:
domain: sensor
device_class: voltage
expansion_rules:
class: "[padec] napetost[i]"

# Volume
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: volume
slots:
domain: sensor
device_class: volume
expansion_rules:
class: "(volumen|prostornina|količina)"

# Volume storage
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: volume_storage
slots:
domain: sensor
device_class: volume_storage
expansion_rules:
class: "[skupna] (količina|prostornina|volumen) [shranjena]"

# Water
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: water
slots:
domain: sensor
device_class: water
expansion_rules:
class: "([skupna] [količina] [porabljene] vode|[skupna] poraba vode)"

# Weight
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: weight
slots:
domain: sensor
device_class: weight
expansion_rules:
class: "(utež|masa|teža)"

# Wind speed
- sentences:
- "<kaksna_je_vrednost_senzorja>"
response: sensor_value
requires_context:
domain: sensor
device_class: wind_speed
slots:
domain: sensor
device_class: wind_speed
expansion_rules:
class: "hitrost [vetra]"
42 changes: 42 additions & 0 deletions tests/sl/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -805,3 +805,45 @@ entities:
attributes:
device_class: volatile_organic_compounds_parts
unit_of_measurement: "ppm"

- name: "vhodne napetosti"
id: "sensor.input_voltage"
state: "12"
attributes:
device_class: voltage
unit_of_measurement: "V"

- name: "porabe vodne črpalke danes"
id: "sensor.water_pump_usage_today"
state: "1356"
attributes:
device_class: volume
unit_of_measurement: "L"

- name: "hranilniku vode"
id: "sensor.water_pump_buffer"
state: "28"
attributes:
device_class: volume_storage
unit_of_measurement: "L"

- name: "vodn(e|i) črpalk(e|i)"
id: "sensor.water_pump_usage"
state: "5987"
attributes:
device_class: water
unit_of_measurement: "L"

- name: "postelje"
id: "sensor.bed_sensor_weight"
state: "87"
attributes:
device_class: weight
unit_of_measurement: "kg"

- name: "anemometra"
id: "sensor.mistral_speed"
state: "33"
attributes:
device_class: wind_speed
unit_of_measurement: "km/h"
71 changes: 71 additions & 0 deletions tests/sl/sensor_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -503,3 +503,74 @@ tests:
device_class: volatile_organic_compounds_parts
name: "sračkalice 2"
response: "Vrednost senzorja je 35 ppm"

# Voltage
- sentences:
- "kakšna je napetost vhodne napetosti?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: voltage
name: "vhodne napetosti"
response: "Vrednost senzorja je 12 V"

# Volume
- sentences:
- "kakšna je količina porabe vodne črpalke danes?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: volume
name: "porabe vodne črpalke danes"
response: "Vrednost senzorja je 1356 L"

# Volume storage
- sentences:
- "kakšna je skupna količina v hranilniku vode?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: volume_storage
name: "hranilniku vode"
response: "Vrednost senzorja je 28 L"

# Water
- sentences:
- "kakšna je skupna poraba vode na vodni črpalki?"
- "kakšna je skupna količina porabljene vode vodne črpalke?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: water
name:
- "vodni črpalki"
- "vodne črpalke"
response: "Vrednost senzorja je 5987 L"

# Weight
- sentences:
- "kakšna je teža senzorja postelje?"
- "kakšna je masa senzorja postelje?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: weight
name: "postelje"
response: "Vrednost senzorja je 87 kg"

# Wind speed
- sentences:
- "kakšna je hitrost vetra anemometra?"
- "kakšna je hitrost anemometra?"
intent:
name: HassGetState
slots:
domain: sensor
device_class: wind_speed
name: "anemometra"
response: "Vrednost senzorja je 33 km/h"