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

Add NodeAlive event to the ZWaveNode class, and add lastSeen property to the NodeStatistics class. #67

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

spudwebb
Copy link

No description provided.

@marcus-j-davies
Copy link
Member

No idea why I didn't include Alive (the most basic of events 😮 ) - Thanks!
Will get it merged tonight!

@marcus-j-davies
Copy link
Member

marcus-j-davies commented Jun 14, 2024

@spudwebb

Can you do me favour?

set lastSeen, in the statistics, and ZWaveNode class (its there also) as DateTime

The original output should hopefully be ISO 8601 and Im thinking it should parse to DateTime?

I have no way to test on my system currently

@spudwebb
Copy link
Author

yes it parses to DateTime. 2 questions:

  1. lastSeen reported by ZWave JS seems to be an UTC time, do we want to convert it to a local time or do we want to keep it as UTC?
  2. when it is null, it is parsed as 0001-01-01T00:00:00 because DateTime is a struct and it is its default value. Do we want to use a nullable property instead DateTime?, so that we can have a null value for this property?

@marcus-j-davies
Copy link
Member

marcus-j-davies commented Jun 14, 2024

  1. My Vote is UTC - allow the front end to massage as seems fit?
  2. I think a nullable object (I think we have a few in place already)

@spudwebb
Copy link
Author

Done and tested.

@marcus-j-davies marcus-j-davies merged commit d5fe7ba into zwave-js:4.0.0 Jun 14, 2024
1 check passed
@marcus-j-davies
Copy link
Member

Merged!

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

Successfully merging this pull request may close these issues.

None yet

2 participants