Skip to content

Commit

Permalink
Fix translations
Browse files Browse the repository at this point in the history
  • Loading branch information
turbulator committed May 14, 2024
1 parent 9258cf8 commit 7fc2836
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
5 changes: 5 additions & 0 deletions custom_components/pandora_cas/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ def is_on(self) -> bool:
"""Return the state of the binary sensor."""
return self._state

@property
def translation_key(self):
"""Return the translation key to translate the entity's name and states."""
return self.device_class

# pylint: disable=attribute-defined-outside-init
@callback
def _update_callback(self, force=False):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pandora_cas/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/turbulator/pandora-cas/issues",
"requirements": [],
"version": "1.4.5"
"version": "1.4.6"
}

This file was deleted.

2 changes: 1 addition & 1 deletion custom_components/pandora_cas/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
}
}
}
}
}
30 changes: 29 additions & 1 deletion custom_components/pandora_cas/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,33 @@
"description": "Задайте параметры для {name}"
}
}
},
"entity": {
"binary_sensor": {
"pandora_cas__engine": {
"state": {
"off": "Заглушен",
"on": "Работает"
}
},
"pandora_cas__door_male": {
"state": {
"off": "Закрыт",
"on": "Открыт"
}
},
"pandora_cas__moving": {
"state": {
"off": "Неподвижен",
"on": "В движении"
}
},
"pandora_cas__guard": {
"state": {
"off": "Под охраной",
"on": "Снято с охраны"
}
}
}
}
}
}

0 comments on commit 7fc2836

Please sign in to comment.