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

Translation of rooms not working #723

Open
3 tasks done
spunkt123 opened this issue Mar 23, 2024 · 4 comments
Open
3 tasks done

Translation of rooms not working #723

spunkt123 opened this issue Mar 23, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@spunkt123
Copy link

Checklist

  • I have updated the card to the latest version available
  • I have cleared the cache of my browser
  • I have checked if the problem is already reported

The problem

I would like to translate the names of my rooms. In this "sensor sensor.bb8_erdgeschoss_current_room" the configurated name of Mi Home is shown. Unfortunately the name is in english and i would like to translate it to german.

I tried it with:

tiles:
  - label: Aktueller Raum
    entity: sensor.bb8_erdgeschoss_current_room
    icon_source: sensor.bb8_erdgeschoss_current_room.attributes.icon
    translations:
      Living Room: Wohnzimmer
      Dining Hall: Esszimmer
      Kitchen: Küche
      Corridor: Flur
      Closet: Treppenhaus
      Bathroom: Bad

But it stays in english.

What version of a card has described problem?

v2.2.2

What was the last working version card?

No response

What vacuum model do you have problems with?

dreame.vacuum.p2029 & dreame.vacuum.p2009

Which integration do you use to control your vacuum (link)?

https://github.com/Tasshack/dreame-vacuum

What browser (browsers/apps) does have this problem?

Chrome

What version of Home Assistant do you use?

2024.3.1

What type of installation are you running?

Home Assistant Container

Card's configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.bb8_erdgeschoss_map
calibration_source:
  camera: true
entity: vacuum.bb8_erdgeschoss
vacuum_platform: Tasshack/dreame-vacuum
map_locked: true
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        value_not: cleaning
      - entity: vacuum.bb8_erdgeschoss
        value_not: error
      - entity: vacuum.bb8_erdgeschoss
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
  - icon: mdi:pause
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        value_not: docked
      - entity: vacuum.bb8_erdgeschoss
        value_not: idle
      - entity: vacuum.bb8_erdgeschoss
        value_not: error
      - entity: vacuum.bb8_erdgeschoss
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
  - icon: mdi:stop
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        value_not: docked
      - entity: vacuum.bb8_erdgeschoss
        value_not: idle
      - entity: vacuum.bb8_erdgeschoss
        value_not: error
      - entity: vacuum.bb8_erdgeschoss
        value_not: paused
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        value_not: docked
      - entity: vacuum.bb8_erdgeschoss
        value_not: returning
    tooltip: Rückkehr zur Basis
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
  - menu_id: fan_speed
    icon: mdi:fan-remove
    label: Leise
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value: Silent
    tooltip: Lüftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
        fan_speed: Silent
  - menu_id: fan_speed
    icon: mdi:fan-speed-1
    label: Standard
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value: Standard
    tooltip: Lüftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
        fan_speed: Standard
  - menu_id: fan_speed
    icon: mdi:fan-speed-2
    label: Strong
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value: Strong
    tooltip: Lüftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
        fan_speed: Strong
  - menu_id: fan_speed
    icon: mdi:fan-speed-3
    label: Turbo
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value: Turbo
    tooltip: Lüftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
        fan_speed: Turbo
  - icon: mdi:fan-alert
    conditions:
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value_not: Silent
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value_not: Standard
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value_not: Strong
      - entity: vacuum.bb8_erdgeschoss
        attribute: fan_speed
        value_not: Turbo
    tooltip: Lüftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.bb8_erdgeschoss
        fan_speed: Silent
tiles:
  - label: Status
    entity: vacuum.bb8_erdgeschoss
    icon_source: vacuum.bb8_erdgeschoss.attributes.icon
  - label: Aktueller Raum
    entity: sensor.bb8_erdgeschoss_current_room
    icon_source: sensor.bb8_erdgeschoss_current_room.attributes.icon
    translations:
      Living Room: Wohnzimmer
      Dining Hall: Esszimmer
      Kitchen: Küche
      Corridor: Flur
      Closet: Treppenhaus
      Bathroom: Bad
  - label: Batterie
    entity: sensor.bb8_erdgeschoss_battery_level
    icon_source: vacuum.bb8_erdgeschoss.attributes.battery_icon
  - label: Saugleistung
    entity: select.bb8_erdgeschoss_suction_level
    icon_source: select.bb8_erdgeschoss_suction_level.attributes.icon
  - label: Wassermenge
    entity: select.bb8_erdgeschoss_water_volume
    icon_source: select.bb8_erdgeschoss_water_volume.attributes.icon
  - label: Gereinigte Fläche
    entity: sensor.bb8_erdgeschoss_cleaned_area
    icon_source: sensor.bb8_erdgeschoss_cleaned_area.attributes.icon
map_modes:
  - template: vacuum_clean_segment
    predefined_selections:
      - id: '1'
        icon:
          name: mdi:foot-print
          x: 6550
          'y': -1450
        label:
          text: Flur
          x: 6550
          'y': -1450
          offset_y: 35
        outline:
          - - 4050
            - -2300
          - - 9100
            - -2300
          - - 9100
            - -800
          - - 4050
            - -800
      - id: '2'
        icon:
          name: mdi:chef-hat
          x: 8650
          'y': 1500
        label:
          text: Küche
          x: 8650
          'y': 1500
          offset_y: 35
        outline:
          - - 6350
            - -800
          - - 10250
            - -800
          - - 10250
            - 2800
          - - 6350
            - 2800
      - id: '3'
        icon:
          name: mdi:toilet
          x: 10100
          'y': -2700
        label:
          text: Bad
          x: 10100
          'y': -2700
          offset_y: 35
        outline:
          - - 9100
            - -4600
          - - 11000
            - -4600
          - - 11000
            - -850
          - - 9100
            - -850
      - id: '4'
        icon:
          name: mdi:hanger
          x: 5100
          'y': -3550
        label:
          text: Treppenhaus
          x: 5100
          'y': -3550
          offset_y: 35
        outline:
          - - 4300
            - -4850
          - - 6750
            - -4850
          - - 6750
            - -2300
          - - 4300
            - -2300
      - id: '5'
        icon:
          name: mdi:sofa-outline
          x: 1450
          'y': 1750
        label:
          text: Wohnzimmer
          x: 1450
          'y': 1750
          offset_y: 35
        outline:
          - - -550
            - -800
          - - 6350
            - -800
          - - 6350
            - 3300
          - - -550
            - 3300
      - id: '6'
        icon:
          name: mdi:archive-outline
          x: 8350
          'y': -3000
        label:
          text: Abstellkammer
          x: 8350
          'y': -3000
          offset_y: 35
        outline:
          - - 7900
            - -4100
          - - 8850
            - -4100
          - - 8850
            - -2200
          - - 7900
            - -2200
      - id: '7'
        icon:
          name: mdi:room-service-outline
          x: 1700
          'y': -2600
        label:
          text: Esszimmer
          x: 1700
          'y': -2600
          offset_y: 35
        outline:
          - - -550
            - -4450
          - - 4050
            - -4450
          - - 4050
            - -800
          - - -550
            - -800
  - template: vacuum_clean_point
two_finger_pan: false

Javascript errors shown in the browser's console (if applicable)

No response

Additional information

No response

@spunkt123 spunkt123 added the bug Something isn't working label Mar 23, 2024
@PiotrMachowski
Copy link
Owner

Are the values of sensor.bb8_erdgeschoss_current_room exactly the same as values provided in card config?

Does translating work for Kitchen, Corridor, Closet or Bathroom?

@spunkt123
Copy link
Author

spunkt123 commented Mar 25, 2024

Are the values of sensor.bb8_erdgeschoss_current_room exactly the same as values provided in card config?

yes.

Does translating work for Kitchen, Corridor, Closet or Bathroom?

unfortunately not. :(

@PiotrMachowski
Copy link
Owner

Can you show the state of the entity in dev tools?

@spunkt123
Copy link
Author

spunkt123 commented Mar 27, 2024

Can you show the state of the entity in dev tools?

Thats the entity for my living room:
<template TemplateState(<state sensor.bb8_erdgeschoss_current_room=Living Room; room_id=5, room_icon=mdi:sofa-outline, icon=mdi:home-map-marker, friendly_name=BB8 Erdgeschoss Current Room @ 2024-03-26T06:50:45.305523+01:00>)>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants