lovelace-xiaomi-vacuum-map-card: Unable to Press Start on Tizen Browser

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

Vacuum Card installed, and working well on Xiaomi 1C, with call_actions, for both zone and room cleanup. Works well on browsers, phone, ha app, but unable to initiate Zone or Room cleaning on Samsung Home Hub fridge browser, running Tizen 6.0. first world problem I know, but would be good if I can somehow get it working. All other buttons work, just not the button to start zone or room cleanup. All other HA buttons work, using full mushroom cards, and standard cards. they all work fine.

What version of a card has described problem?

2.0.11

What was the last working version card?

No response

What vacuum model do you have problems with?

dreame_mb1808

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

custom

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

tizen 6.0

What version of Home Assistant do you use?

core-2022.6.2

What type of installation are you running?

Home Assistant OS

Card’s configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
entity: vacuum.dreame_mb1808_048e_robot_cleaner
tiles:
  - label: Charging State
    entity: sensor.dreame_mb1808_048e_charging_state
    icon: mdi:vacuum
  - label: Battery
    entity: sensor.dreame_mb1808_048e_battery_level
    icon: mdi:battery
    unit: '%'
  - label: Filter time
    entity: sensor.dreame_mb1808_048e_filter_left_time
    icon: mdi:air-filter
    unit: h
  - label: Filter Life
    entity: sensor.dreame_mb1808_048e_filter_life_level
    icon: mdi:air-filter
    unit: '%'
  - label: Main Brush Left
    entity: sensor.dreame_mb1808_048e_brush_left_time
    icon: mdi:brush
    unit: h
  - label: Main Brush Life
    entity: sensor.dreame_mb1808_048e_brush_life_level
    icon: mdi:brush
    unit: '%'
  - label: Side Brush Left
    entity: sensor.dreame_mb1808_048e_brush_left_time_2
    icon: mdi:brush
    unit: h
  - label: Side Brush Life
    entity: sensor.dreame_mb1808_048e_brush_life_level_2
    icon: mdi:brush
    unit: '%'
vacuum_platform: send_command
map_locked: true
map_modes:
  - template: vacuum_clean_zone
    max_selections: 1
    repeats_type: EXTERNAL
    max_repeats: 5
    service_call_schema:
      service: xiaomi_miot.call_action
      service_data:
        entity_id: vacuum.dreame_mb1808_048e_robot_cleaner
        siid: 18
        aiid: 1
        params:
          - piid: 1
            value: 19
          - piid: 21
            value: '{"areas":[[[[selection_unwrapped]],[[repeats]],1,1]]}'
        force_params: true
  - template: vacuum_clean_segment
    max_selections: 1
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: xiaomi_miot.call_action
      service_data:
        entity_id: vacuum.dreame_mb1808_048e_robot_cleaner
        siid: 18
        aiid: 1
        params:
          - piid: 1
            value: 18
          - piid: 21
            value: '{"selects":[[[[selection_unwrapped]],[[repeats]],3,3,1]]}'
        force_params: true
    predefined_selections:
      - id: 7
        label:
          text: Movie Room
          x: 4325
          'y': -10650
          offset_y: 35
        icon:
          name: mdi:movie-play
          x: 4325
          'y': -10650
      - id: 8
        label:
          text: Movie Hall
          x: 1150
          'y': -3450
          offset_y: 35
        icon:
          name: mdi:movie-roll
          x: 1150
          'y': -3450
      - id: 5
        label:
          text: Guest Room
          x: -1000
          'y': -725
          offset_y: 35
        icon:
          name: mdi:bed
          x: -1000
          'y': -725
      - id: 6
        label:
          text: Cat Wheel
          x: 1925
          'y': 5650
          offset_y: 35
        icon:
          name: mdi:ferris-wheel
          x: 1925
          'y': 5650
      - id: 4
        label:
          text: Guest Bath
          x: -1100
          'y': 3800
          offset_y: 35
        icon:
          name: mdi:shower
          x: -1100
          'y': 3800
      - id: 3
        label:
          text: Day Room
          x: -1525
          'y': 7575
          offset_y: 35
        icon:
          name: mdi:chair-rolling
          x: -1525
          'y': 7575
      - id: 2
        label:
          text: Cat Room
          x: 125
          'y': 11975
          offset_y: 35
        icon:
          name: mdi:cat
          x: 125
          'y': 11975
      - id: 1
        label:
          text: Sleigh Room
          x: 3775
          'y': 11950
          offset_y: 35
        icon:
          name: mdi:bed
          x: 3775
          'y': 11950

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

unable to obtain on fridge browser

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Unfortunately the error does not show in a reasonably up-to-date chrome (95.x), it only shows in fully-kiosk for me.

Nevermind, here’s a log of the error that gets thrown when I click on the not-working play button:

(contents here:

xiaomi-vacuum-map-card.js?hacstag=193372044212:44 Uncaught (in promise) TypeError: JSON.stringify(...).replaceAll is not a function
    at Function.getDefaultVariables (xiaomi-vacuum-map-card.js?hacstag=193372044212:44)
    at vo.apply (xiaomi-vacuum-map-card.js?hacstag=193372044212:44)
    at ho._applyData (xiaomi-vacuum-map-card.js?hacstag=193372044212:44)
    at ho.getServiceCall (xiaomi-vacuum-map-card.js?hacstag=193372044212:44)
    at HTMLElement._run (xiaomi-vacuum-map-card.js?hacstag=193372044212:1052)
    at HTMLElement.<anonymous> (xiaomi-vacuum-map-card.js?hacstag=193372044212:1052)
    at Z.handleEvent (xiaomi-vacuum-map-card.js?hacstag=193372044212:17)
    at ce (xiaomi-vacuum-map-card.js?hacstag=193372044212:44)
    at xiaomi-vacuum-map-card.js?hacstag=193372044212:294
getDefaultVariables @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
apply @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
_applyData @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
getServiceCall @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
_run @ xiaomi-vacuum-map-card.js?hacstag=193372044212:1052
(anonymous) @ xiaomi-vacuum-map-card.js?hacstag=193372044212:1052
handleEvent @ xiaomi-vacuum-map-card.js?hacstag=193372044212:17
ce @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
(anonymous) @ xiaomi-vacuum-map-card.js?hacstag=193372044212:294
async function (async)
(anonymous) @ xiaomi-vacuum-map-card.js?hacstag=193372044212:1052
handleEvent @ xiaomi-vacuum-map-card.js?hacstag=193372044212:17
ce @ xiaomi-vacuum-map-card.js?hacstag=193372044212:44
(anonymous) @ xiaomi-vacuum-map-card.js?hacstag=193372044212:294
setTimeout (async)
i @ xiaomi-vacuum-map-card.js?hacstag=193372044212:294

err.log

Seems like there’s an easy fix for such issues:

https://www.designcise.com/web/tutorial/how-to-fix-replaceall-is-not-a-function-javascript-error

i have the same issue with my old cellphone that stuck with android9. it seems to be a webview related problem

Added to miot config now.

Everything updated to look nice and consistent 👍