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

Bump follow-redirects from 1.15.4 to 1.15.6 #194

Merged
merged 15 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ const DATAFIELDS = [
listener_conversion: null,
scheduler_conversion: null
},
{
id: 'last_listener_update',
channels: [{
channel: 'info',
name: 'Last data received from Listener (raw)'
}],
type: 'string',
wunderground: 'last_listener_update',
ecowitt: 'last_listener_update',
scheduler: null,
listener_conversion: null,
scheduler_conversion: null
},
{
id: 'UVraw',
channels: [{
Expand Down
4 changes: 2 additions & 2 deletions lib/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Listener {
if (my_path == this.path) {
this.adapter.log.debug('Listener received WU update: ' + JSON.stringify(json_response));
// add full string property
json_response.last_listener_update = JSON.stringify(json_response);
json_response['last_listener_update'] = JSON.stringify(json_response);
// this.adapter.setStateAsync('info.last_listener_update', { val: JSON.stringify(json_response), ack: true });

response.writeHead(200, { 'Content-Type': 'text/html' });
Expand Down Expand Up @@ -101,7 +101,7 @@ class Listener {
this.adapter.log.debug('Listener body is ' + my_body);
json_response = parse(my_body);
this.adapter.log.debug('Listener received EW update: ' + JSON.stringify(json_response));
json_response.last_listener_update = JSON.stringify(json_response);
json_response['last_listener_update'] = JSON.stringify(json_response);
//this.adapter.setStateAsync('info.last_listener_update', { val: JSON.stringify(json_response), ack: true });
response.end('ok');
this.adapter.setStates(new Date(), this.extract_values(json_response));
Expand Down
1 change: 0 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ class Sainlogic extends utils.Adapter {
setStates(date, obj_values) {

this.setStateAsync('info.last_update', { val: date.toString(), ack: true });
this.setStateAsync('info.last_listener_update', {val: obj_values['last_listener_update'], ack:true });

for (const attr in obj_values) {
// extract attribute id w/o channel
Expand Down
52 changes: 33 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^10.0.13",
"@types/sinon-chai": "^3.2.8",
"axios": "^0.27.2",
"axios": "^1.6.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^8.23.1",
Expand Down
Loading