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

iCloud3 v3.0 Event Log creation #287

Open
sfguy83 opened this issue Mar 19, 2024 · 6 comments
Open

iCloud3 v3.0 Event Log creation #287

sfguy83 opened this issue Mar 19, 2024 · 6 comments

Comments

@sfguy83
Copy link

sfguy83 commented Mar 19, 2024

Hi. I’m running into a error when saving the yaml code shared in the setup.

Error:
Unable to parse YAML: YAMLException: bad indentation of a mapping entry (26:9) 23 | name: TravTime 24 | - entity: sensor.gary_ipho ... 25 | name: NextUpdt 26 | - type: glance --------------^ 27 | columns: 5 28 | entities:

Error is a result of following Step 5.2 - #3 on this New Installation guide https://gcobb321.github.io/icloud3_v3_docs/#/chapters/3.2-installing-and-configuring

I get the same error if I paste the code as is into the HA dashboard or edit the code to include my device name. There's an issue with the code.

Thanks!

@gcobb321
Copy link
Owner

Yaml is very unforgiving about spaces and integrations of each line. Add or remove the spaces on those lines until it works. Or delete the code for that entity and add it back using the gui. I’ll check it out and see what I find.

@gcobb321
Copy link
Owner

The sample dashboard yaml code format error has been corrected

@cyberchan
Copy link

I’m also having this issue, with or without changing code to match my devices. I’m confused on what @gcobb321 meant about spacing. Could I get some help with that?

@gcobb321
Copy link
Owner

gcobb321 commented May 3, 2024

As I said, YAML is very strict about the number of spaces before a text value. The example in the documentation had the wrong number of spaces before the text and an error message was being displayed that one of the lines could not be processed.

The example in the documentation was corrected.

Google YAML parsing for more information about YAML errors

@sfguy83
Copy link
Author

sfguy83 commented May 12, 2024

Unfortunately, the sample code wasn’t fixed. Or maybe the formatting changes in GitHub. For others, the correct code is below. Also note the name Gary and Lillian are both used and need to be updated. The site I used to fix the code is https://codebeautify.org/yaml-parser-online. Unfortunately, I found most other YAML parser websites confusing.

title: iCloud3
views:
 - title: iCloud3
   cards:
     - square: false
       columns: 1
       type: grid
       cards:
         - type: glance
           state_color: true
           show_name: true
           show_icon: true
           show_state: true
           columns: 5
           entities:
             - entity: device_tracker.gary_iphone
               name: Gary
             - entity: sensor.gary_iphone_arrival_time
               name: Arrive
             - entity: sensor.gary_iphone_zone_distance
               name: Distance
             - entity: sensor.gary_iphone_travel_time
               name: TravTime
             - entity: sensor.gary_iphone_next_update
               name: NextUpdt
         - type: glance
           columns: 5
           entities:
            - entity: sensor.gary_iphone_battery
              name: Battery
            - entity: sensor.gary_iphone_interval
              name: Interval
            - entity: sensor.gary_iphone_moved_distance
              name: Moved
            - entity: sensor.gary_iphone_last_located
              name: Located
            - entity: sensor.gary_iphone_last_update
              name: LastUpdt
         - type: entities
           entities:
             - entity: sensor.gary_iphone_info
               name: Info - Lillian
               icon: mdi:information-outline

     - type: grid
       square: false
       columns: 1
       cards:
         - type: custom:icloud3-event-log-card

Edit: I put this in a code block so the formatting characters are not displayed as GitHub Markdown dots. @gcobb321

@sfguy83 sfguy83 closed this as completed May 12, 2024
@sfguy83 sfguy83 reopened this May 12, 2024
@gcobb321
Copy link
Owner

I have updated the code in the iCloud3 documentation to the corrected yaml code and it now checks out as valid. For some reason, I would copy it from Lovelace into the documentation, everything would look fine but an extra space was being inserted between my docs, GitHub and the program that I am using for the manual display.

Thanks for bringing it back to my attention.

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

No branches or pull requests

3 participants