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

Rotate by Map ID #506

Open
cataseven opened this issue Jan 9, 2024 · 1 comment
Open

Rotate by Map ID #506

cataseven opened this issue Jan 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@cataseven
Copy link

cataseven commented Jan 9, 2024

Description

At present, rotate config is applied all saved maps. I have 4 maps but I want to rotate only 1 of them

Solution

Is it possible to config like?;

    map_transformation:
      map_id: 123456789
        rotate: 90
      map_id: 456456456
        rotate: 180

Alternatives

No response

Context

No response

@cataseven cataseven added the enhancement New feature or request label Jan 9, 2024
@cataseven
Copy link
Author

cataseven commented Jan 21, 2024

Find an alternative:

Use card_mod on your vacuum map card

Code

card_mod:
  style: |
    #map-image {
       transform: rotate(270deg);
     }

EXAMPLE (You have to edit x,y coordinates of label and icons)

                type: custom:xiaomi-vacuum-map-card
                entity: vacuum.viomi_se
                preset_name: Downstairs
                map_source:
                  camera: camera.xiaomi_cloud_map_extractor
                  crop:
                    top: 435
                    bottom: 280
                    left: 490
                    right: 160
                calibration_source:
                  camera: true
                clean_selection_on_start: true
                map_locked: true
                two_finger_pan: true
                icons: []
                tiles: []
                map_modes:
                  - selection_type: ROOM
                    name: Room Cleaning
                    icon: mdi:floor-plan
                    max_selections: 5
                    repeats_type: NONE
                    predefined_selections:
                      - id: 10
                        label:
                          text: Kitchen
                          x: 10.3
                          'y': -0.9
                        icon:
                          name: mdi:water-plus
                          x: 10.3
                          'y': -1.5
                      - id: 11
                        label:
                          text: Living Room
                          x: 3.7
                          'y': -2.1
                        icon:
                          name: mdi:water-plus
                          x: 3.7
                          'y': -2.7
                      - id: 12
                        label:
                          text: Hallway
                          x: 9.7
                          'y': -3.7
                        icon:
                          name: mdi:water-plus
                          x: 9.7
                          'y': -4.2
                      - id: 13
                        label:
                          text: Guest Room
                          x: 12.1
                          'y': -5.8
                        icon:
                          name: mdi:water-plus
                          x: 12.1
                          'y': -6.3
                      - id: 15
                        label:
                          text: Staircase
                          x: 8.3
                          'y': -5.2
                        icon:
                          name: mdi:water-plus
                          x: 8.3
                          'y': -5.7
                    service_call_schema:
                      service: xiaomi_miot.call_action
                      service_data:
                        entity_id: vacuum.viomi_v13
                        siid: 4
                        aiid: 15
                        params:
                          - piid: 21
                            value: 0
                          - piid: 22
                            value: 1
                          - piid: 20
                            value: '[[selection_unwrapped]]'
                        force_params: true
                  - template: vacuum_clean_zone
                    name: Zone Cleaning
                  - template: vacuum_clean_point
                    name: Point Cleaning
                vacuum_platform: marotoweb/viomise
                card_mod:
                  style: |
                    ha-card {
                      --map-card-room-label-color: rgb(255, 255, 255);
                      --map-card-room-label-color-selected: rgb(255, 255, 255);
                      --map-card-room-icon-wrapper-size: 18px;
                      --map-card-room-icon-size: 14px;
                    }

                    #map-image {
                      transform: rotate(270deg);
                    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants