core icon indicating copy to clipboard operation
core copied to clipboard

izone control zone name is no longer populated

Open alexeiw123 opened this issue 1 year ago • 2 comments

The problem

the climate.name entity that is created for my izone system used to provide an attribute with the name of the control zone.

I have noticed that this is now showing as: control_zone_name: null at all times.

image

What version of Home Assistant Core has the issue?

core-2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

izone

Link to integration documentation on our website

https://www.home-assistant.io/integrations/izone

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

alexeiw123 avatar Feb 16 '24 02:02 alexeiw123

Hey there @swamp-ig, mind taking a look at this issue as it has been labeled with an integration (izone) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of izone can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign izone Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


izone documentation izone source (message by IssueLinks)

home-assistant[bot] avatar Feb 16 '24 02:02 home-assistant[bot]

Any way that I'm able to provide something meaningful to progress this? I ran some debug logs but couldn't see anything useful.

I'm using the control zone in a template to get this for now:

{% set d ={
0: 'Room 1',
1: 'Room 2',
2: 'Room 3',
3: 'Room 4',
4: 'Room 5'
} -%}

{%- if state_attr('climate.izone_controller_x','control_zone') in d.keys() -%}
  {{ d.get(state_attr('climate.izone_controller_x','control_zone')) }}
{%- else %}
  {{ 'No Target Zone' }}
{%- endif %}

alexeiw123 avatar May 06 '24 00:05 alexeiw123

I think what needs to happen is this line needs to change to:

return zone._zone.name

If you want to create a PR and test it, then I'll review and accept.

Swamp-Ig avatar May 06 '24 11:05 Swamp-Ig

Alternately you could create a template sensor that would do what you want it to too.

Swamp-Ig avatar May 06 '24 11:05 Swamp-Ig

I think what needs to happen is this line needs to change to:

return zone._zone.name

If you want to create a PR and test it, then I'll review and accept.

Great, I'll take a look. I'm new to all this PR stuff, have done a few easy ones but will need to learn how to test my changes. Seems like a good place to start.

Alternately you could create a template sensor that would do what you want it to too.

Yep, that's what I've done above but I'd also like to fix it properly :)

alexeiw123 avatar May 06 '24 11:05 alexeiw123

That would be great. The main thing that's holding back ongoing improvement of this component is getting stuff through code review. If I have someone else who can work on it with me, then they can approve PRs and then I can add further functionality.

Swamp-Ig avatar May 06 '24 23:05 Swamp-Ig

That would be great. The main thing that's holding back ongoing improvement of this component is getting stuff through code review. If I have someone else who can work on it with me, then they can approve PRs and then I can add further functionality.

At the moment, I'm struggling a little with how I can make that change in my local install, considering that I don't have a development environment. Making the PR is fine - but testing it, not so much.

I'd love to be able to review and approve PRs but I don't have the development knowledge to be able to do so effectively to be honest.

alexeiw123 avatar May 07 '24 23:05 alexeiw123

https://developers.home-assistant.io/docs/development_environment/

Any change needs to be tested before being accepted. You can set up a dev environment and add izone to it. You can have multiple HA instances connect to your existing izone.

Swamp-Ig avatar May 08 '24 00:05 Swamp-Ig

Is there any way to figure out when rooms map to the d.keys() when creating a template sensor?

Also, the HA development environment looks very good. Maybe I can test it, too.

stormshaker avatar May 12 '24 12:05 stormshaker

I setup the HA dev container yesterday to test the above change, and was able to start an instance of HA on my laptop. But, how can I connect it out to the iZone controller on the network? I added --network=host to the container runArgs, but it seems the iZone integration needs to discover the controller out on the network. When I try to add the iZone integration, it just doesn't discover the bridge. Someone said the dev container can't receive broadcast packets.

stormshaker avatar May 18 '24 23:05 stormshaker

I think I had it set up on a remote dev container on a linux VM. I don't think docker allows host mode on windows. I can't really remember though sorry.

Swamp-Ig avatar May 19 '24 10:05 Swamp-Ig

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

This is still an issue on 2024.8.2.

stormshaker avatar Aug 17 '24 12:08 stormshaker

There's a fix above, create a PR to change it and it'll be fixed

Swamp-Ig avatar Aug 22 '24 03:08 Swamp-Ig

I've not actioned this for various reasons but basically I don't have a dev environment to test changes and nor will I be able to devote time to one in the coming months.

alexeiw123 avatar Aug 22 '24 03:08 alexeiw123