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

Include useful information in events #324

Closed
ep1cman opened this issue Nov 5, 2022 · 7 comments
Closed

Include useful information in events #324

ep1cman opened this issue Nov 5, 2022 · 7 comments

Comments

@ep1cman
Copy link

ep1cman commented Nov 5, 2022

Hi,

I am currently trying to setup notification for when my heating fires up to track the cause. It would be super useful for the events triggered by this integration to include some data to provide context. It seems this is already in the code but for some reason has been commented out:

In addition, I think the boost duration could be added to the is_boosted event via CONF_EVENT_DATA

@msp1974
Copy link
Collaborator

msp1974 commented Nov 6, 2022

I was going to add event data with these events but then realised that you can get any attributes you want off the climate device by using (as an example)...

{{state_attr(trigger.event.data.entity_id, 'temperature')}}

Is there a scenario this would not work?

@ep1cman
Copy link
Author

ep1cman commented Nov 6, 2022

I am using nodered instead of home assistants built-in scripting (see below). I have a node that listens to the wiser_event event and it emmits a message containing the event data.

I have worked arround this similarly to your above snippet by extracting the entity_id and then querying the entity state separately but this is more convoluted, especially given the code is all there already.

image

@msp1974
Copy link
Collaborator

msp1974 commented Nov 6, 2022

Ok that makes sense when using nodered. I'll add some event data for next release.

msp1974 added a commit that referenced this issue Nov 24, 2022
@msp1974
Copy link
Collaborator

msp1974 commented Jan 9, 2023

Added to v3.2.3beta release if you could check it.

@msp1974
Copy link
Collaborator

msp1974 commented Feb 6, 2023

@ep1cman Were you able to check this?

@ep1cman
Copy link
Author

ep1cman commented Feb 6, 2023

Hi sorry for the delay, I can confirm that the events are now spitting out additional data as requested. Thanks!

Here is a screenshot of the event being recieved in NodeRED:
image

@msp1974 msp1974 mentioned this issue Feb 11, 2023
@msp1974
Copy link
Collaborator

msp1974 commented Feb 11, 2023

Great. Closing issue. Now formally released in v3.3.0.

@msp1974 msp1974 closed this as completed Feb 11, 2023
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

2 participants