diff --git a/custom_components/echonetlite/sensor.py b/custom_components/echonetlite/sensor.py index ca2e4db..ee665a0 100644 --- a/custom_components/echonetlite/sensor.py +++ b/custom_components/echonetlite/sensor.py @@ -178,6 +178,8 @@ async def async_setup_entry(hass, config, async_add_entities, discovery_info=Non class EchonetSensor(SensorEntity): """Representation of an ECHONETLite Temperature Sensor.""" + _attr_translation_key = DOMAIN + def __init__(self, connector, op_code, attributes, name=None, hass=None) -> None: """Initialize the sensor.""" self._connector = connector diff --git a/custom_components/echonetlite/translations/en.json b/custom_components/echonetlite/translations/en.json index c50299b..e918324 100644 --- a/custom_components/echonetlite/translations/en.json +++ b/custom_components/echonetlite/translations/en.json @@ -73,29 +73,29 @@ "high": "High", "very-high": "Very-High", "max": "Max", - "rc-right": "Right Center + Right", - "left-lc": "Left + Left Center", - "lc-center-rc": "Left + Center + Right Center", - "left-lc-rc-right": "Left + Left Center + Right Center + Right", - "right": "Right", - "rc": "Right Center", - "center": "Center", - "center-right": "Center + Right", - "center-rc": "Center + Right Center", - "center-rc-right": "Center + Right Center + Right", - "lc": "Left Center", - "lc-right": "Left Center + Right", - "lc-rc": "Left Center + Right Center", - "left": "Left", - "left-right": "Left + Right", - "left-rc": "Left + Right Center", - "left-rc-right": "Left + Right Center + Right", - "left-center": "Left + Center", - "left-center-right": "Left + Center + Right", - "left-center-rc": "Left + Center + Right Center", - "left-center-rc-right": "Left + Center + Right Center + Right", - "left-lc-right": "Left + Left Center + Right", - "left-lc-rc": "Left + Left Center + Right Center", + "rc-right": "> >>", + "left-lc": "<< <", + "lc-center-rc": "< || >", + "left-lc-rc-right": "<< < > >>", + "right": ">>", + "rc": ">", + "center": "||", + "center-right": "|| >>", + "center-rc": "|| >", + "center-rc-right": "|| > >>", + "lc": "<", + "lc-right": "< >>", + "lc-rc": "< >", + "left": ">>", + "left-right": "<< >>", + "left-rc": "<< >", + "left-rc-right": "<< > >>", + "left-center": "<< ||", + "left-center-right": "<< || >>", + "left-center-rc": "<< || >", + "left-center-rc-right": "<< || > >>", + "left-lc-right": "<< < >>", + "left-lc-rc": "<< < >", "upper": "Upper", "upper-central": "Upper Central", "central": "Central", @@ -130,29 +130,29 @@ "swing_mode": { "name": "Air direction", "state": { - "rc-right": "Right Center + Right", - "left-lc": "Left + Left Center", - "lc-center-rc": "Left + Center + Right Center", - "left-lc-rc-right": "Left + Left Center + Right Center + Right", - "right": "Right", - "rc": "Right Center", - "center": "Center", - "center-right": "Center + Right", - "center-rc": "Center + Right Center", - "center-rc-right": "Center + Right Center + Right", - "lc": "Left Center", - "lc-right": "Left Center + Right", - "lc-rc": "Left Center + Right Center", - "left": "Left", - "left-right": "Left + Right", - "left-rc": "Left + Right Center", - "left-rc-right": "Left + Right Center + Right", - "left-center": "Left + Center", - "left-center-right": "Left + Center + Right", - "left-center-rc": "Left + Center + Right Center", - "left-center-rc-right": "Left + Center + Right Center + Right", - "left-lc-right": "Left + Left Center + Right", - "left-lc-rc": "Left + Left Center + Right Center", + "rc-right": "> >>", + "left-lc": "<< <", + "lc-center-rc": "< || >", + "left-lc-rc-right": "<< < > >>", + "right": ">>", + "rc": ">", + "center": "||", + "center-right": "|| >>", + "center-rc": "|| >", + "center-rc-right": "|| > >>", + "lc": "<", + "lc-right": "< >>", + "lc-rc": "< >", + "left": ">>", + "left-right": "<< >>", + "left-rc": "<< >", + "left-rc-right": "<< > >>", + "left-center": "<< ||", + "left-center-right": "<< || >>", + "left-center-rc": "<< || >", + "left-center-rc-right": "<< || > >>", + "left-lc-right": "<< < >>", + "left-lc-rc": "<< < >", "upper": "Upper", "upper-central": "Upper Central", "central": "Central", diff --git a/custom_components/echonetlite/translations/ja.json b/custom_components/echonetlite/translations/ja.json index 8f2ee61..2bd70af 100644 --- a/custom_components/echonetlite/translations/ja.json +++ b/custom_components/echonetlite/translations/ja.json @@ -61,6 +61,19 @@ } }, "entity": { + "sensor": { + "echonetlite": { + "state": { + "Off": "オフ", + "On": "オン", + "Stopped": "停止", + "Supplying Hot Water": "湯はり中", + "Keeping Bath Temperature": "保温中", + "Heating": "加温中", + "Not Heating": "停止" + } + } + }, "select": { "echonetlite": { "state": { @@ -73,29 +86,29 @@ "high": "強", "very-high": "強々", "max": "最大", - "rc-right": "中右・右", - "left-lc": "左・中左", - "lc-center-rc": "中左・中・中右", - "left-lc-rc-right": "左・中左・中右・右", - "right": "右", - "rc": "中右", - "center": "中央", - "center-right": "中央・右", - "center-rc": "中央・中右", - "center-rc-right": "中央・中右・右", - "lc": "中左", - "lc-right": "中左・右", - "lc-rc": "中左・中右", - "left": "左", - "left-right": "左・右", - "left-rc": "左・中右", - "left-rc-right": "左・中右・右", - "left-center": "左・中央", - "left-center-right": "左・中央・右", - "left-center-rc": "左・中央・中右", - "left-center-rc-right": "左・中央・中右・右", - "left-lc-right": "左・中左・右", - "left-lc-rc": "左・中左・中右", + "rc-right": "> >>", + "left-lc": "<< <", + "lc-center-rc": "< || >", + "left-lc-rc-right": "<< < > >>", + "right": ">>", + "rc": ">", + "center": "||", + "center-right": "|| >>", + "center-rc": "|| >", + "center-rc-right": "|| > >>", + "lc": "<", + "lc-right": "< >>", + "lc-rc": "< >", + "left": ">>", + "left-right": "<< >>", + "left-rc": "<< >", + "left-rc-right": "<< > >>", + "left-center": "<< ||", + "left-center-right": "<< || >>", + "left-center-rc": "<< || >", + "left-center-rc-right": "<< || > >>", + "left-lc-right": "<< < >>", + "left-lc-rc": "<< < >", "upper": "上", "upper-central": "中上", "central": "中", @@ -130,29 +143,29 @@ "swing_mode": { "name": "風向設定", "state": { - "rc-right": "中右・右", - "left-lc": "左・中左", - "lc-center-rc": "中左・中・中右", - "left-lc-rc-right": "左・中左・中右・右", - "right": "右", - "rc": "中右", - "center": "中央", - "center-right": "中央・右", - "center-rc": "中央・中右", - "center-rc-right": "中央・中右・右", - "lc": "中左", - "lc-right": "中左・右", - "lc-rc": "中左・中右", - "left": "左", - "left-right": "左・右", - "left-rc": "左・中右", - "left-rc-right": "左・中右・右", - "left-center": "左・中央", - "left-center-right": "左・中央・右", - "left-center-rc": "左・中央・中右", - "left-center-rc-right": "左・中央・中右・右", - "left-lc-right": "左・中左・右", - "left-lc-rc": "左・中左・中右", + "rc-right": "> >>", + "left-lc": "<< <", + "lc-center-rc": "< || >", + "left-lc-rc-right": "<< < > >>", + "right": ">>", + "rc": ">", + "center": "||", + "center-right": "|| >>", + "center-rc": "|| >", + "center-rc-right": "|| > >>", + "lc": "<", + "lc-right": "< >>", + "lc-rc": "< >", + "left": ">>", + "left-right": "<< >>", + "left-rc": "<< >", + "left-rc-right": "<< > >>", + "left-center": "<< ||", + "left-center-right": "<< || >>", + "left-center-rc": "<< || >", + "left-center-rc-right": "<< || > >>", + "left-lc-right": "<< < >>", + "left-lc-rc": "<< < >", "upper": "上", "upper-central": "中上", "central": "中", diff --git a/custom_components/echonetlite/translations/sensor.ja.json b/custom_components/echonetlite/translations/sensor.ja.json deleted file mode 100644 index 70e9367..0000000 --- a/custom_components/echonetlite/translations/sensor.ja.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "state": { - "_": { - "Off": "オフ", - "On": "オン", - "Stopped": "停止", - "Supplying Hot Water": "湯はり中", - "Keeping Bath Temperature": "保温中", - "Heating": "加温中", - "Not Heating": "停止" - } - } -} \ No newline at end of file