gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Release Candidate 9 - v3.0.rc9 - issue with sensor.xxxx_icloudv3_zone_name #252

Closed andyblac closed 9 months ago

andyblac commented 10 months ago

the sensor is removing spaces from Zone name, see below

Screenshot 2024-01-07 at 12 30 19 Screenshot 2024-01-07 at 12 26 34
gcobb321 commented 10 months ago

It’s always done that. The iCloud3 docs for the Configuration Screens and Parameters > Sensor screen here describes the zone sensors as:

Zone Name Sensors - Zone name sensors provide different formats for displaying the zone name when the device is in a zone. The formatting rules are: _zone_name - A reformatted zone entity name without spaces and apostrophes (the_shores → TheShores) _zone_fname - The zone's friendly name _zone - The HA zone entity

andyblac commented 10 months ago

Even the main state of the entity ?, surely it should contain a space ?

gcobb321 commented 10 months ago

The zone can be displayed in several formats. The format is selected on the Configure Settings > Update Parameters Menu > Format Settings screen. One of them is the HA friendly name (preferred). What have you selected?

andyblac commented 10 months ago

I'm 99% sure it used to contain a space. now just get this

Screenshot 2024-01-07 at 13 49 24 Screenshot 2024-01-07 at 13 47 29
gcobb321 commented 10 months ago

Go to HA Device and Services > Areas and Zones > Zones and change the name of the zone to what you want it to be. Then select HA Zone Friendly Name in the iCloud3 parameters. Nothing has been done to the way the zone name is formatted in a long long time.

andyblac commented 10 months ago

it is how I want it to be,

Screenshot 2024-01-07 at 12 30 19

it already on Friendly name --> PERFERED

zone fname is correct, so is zone display as

gcobb321 commented 10 months ago

There are several Zone sensors that iCloud3 can create — zone_name and zone_fname are two of them. They are selected on the Configure Settings > Sensors screen. The zonename removes spaces, ’s and a few other things that is described on the description line. It is reformatted to make it easier to use in automations without a lot of reformatting, quote Mark checking, etc. it has been this way since v2. The zone_fname sensor does not do any reformatting. Maybe that it’s what you are thinking of.

Create the zone_fname sensor and us that and see if it meets your needs

andyblac commented 10 months ago

ok, yes, it now displayed correctly, thanks, although I'm pretty sure it used to work correctly in early beta's, just not been to a zone with a space for a while

andyblac commented 10 months ago

ok, now have another issue it not working correctly, now Home it not showing as home is the other sensor does.

Screenshot 2024-01-07 at 14 36 02
JtwoA commented 10 months ago

ok, yes, it now displayed correctly, thanks, although I'm pretty sure it used to work correctly in early beta's, just not been to a zone with a space for a while

The inference in your response is that it's not working correctly - that is not the case. In is working as intended/designed. As noted, it has been this way since v2. I've played with this setting in deciding which to use in my automations and can verify it has been there and has not changed since v2.

gcobb321 commented 10 months ago

There were some Zone naming issues early on but that was related to the value that should display in a device tracker entity field.

andyblac commented 10 months ago

so why does it show correctly in the description on setting stage (with a space) in friendly name ????, IMO removing the space for the main state is just wrong.

Screenshot 2024-01-07 at 13 47 29

See above Lloyds Bank has a space in it.

andyblac commented 10 months ago

also using fname will I loose Away as it seems Home does not work ???, what happens if i'm not in a zone with name.

gcobb321 commented 10 months ago

Home and Away will be ok. If you are not in a zone, both zone_name and _fname are Away

andyblac commented 10 months ago

Home and Away will be ok. If you are not in a zone, both zone_name and _fname are Away

hmm, Home not working, it just show the zone name, not Home, my Zone name is not Home, as have 2 homes

JtwoA commented 10 months ago

Home and Away will be ok. If you are not in a zone, both zone_name and _fname are Away

hmm, Home not working, it just show the zone name, not Home, my Zone name is not Home, as have 2 homes

@gcobb321 correct me if I'm wrong - you can have only one HOME zone. User may have two houses but only one can be delineated as "home", yes? The true home zone would be wherever HA lives.

andyblac commented 10 months ago

Home and Away will be ok. If you are not in a zone, both zone_name and _fname are Away

hmm, Home not working, it just show the zone name, not Home, my Zone name is not Home, as have 2 homes

@gcobb321 correct me if I'm wrong - you can have only one HOME zone. User may have two houses but only one can be delineated as "home", yes?

correct, my main home is my Home, but both zones name are the street name. has always been fine in the past. fname is just showing the Zone Name.

gcobb321 commented 10 months ago

Yes, the Home zone is where HA Server lives. It's name (friendly name) can be changed on the Zone settings screen. I think it will only change the friendly name (have never tried it), not the zone.home entity name. Otherwise, another house is just another zone.

andyblac commented 10 months ago

zone_name

Screenshot 2024-01-07 at 15 41 03

zone_fname

Screenshot 2024-01-07 at 15 41 54
gcobb321 commented 10 months ago

Thanks for the info. The HA zone names and data come from config/.storage/zone and config/.storage/core.config files and is provided by HA when iC3 starts.