homebridge-multiswitcheroo
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -16,3 +16,9 @@ # Changelog | ||
# Changelog | ||
## [3.0.3] - 2024-01-05 | ||
### Fixed | ||
- Updated code to accept code `204` as success. | ||
## [3.0.2] - 2023-09-06 | ||
@@ -19,0 +25,0 @@ ### Fixed |
@@ -88,3 +88,3 @@ const axios = require('axios'); | ||
.then((response) => { | ||
if (response.status === 200) { | ||
if (response.status === 200 || response.status === 204) { | ||
callback(null); | ||
@@ -112,3 +112,3 @@ } else { | ||
.then((response) => { | ||
if (response.status === 200) { | ||
if (response.status === 200 || response.status === 204) { | ||
@@ -115,0 +115,0 @@ const statusData = JSON.stringify(response.data); // Parse the response data |
{ | ||
"name": "homebridge-multiswitcheroo", | ||
"displayName": "MultiSwitcheroo", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"author": "iSteve-O", | ||
"description": "User defined switches for http GET requests. Simple on/off or multiswitch on/off. Useful for lights, A/V systems, home automation, and includes live status polling!", | ||
"license": "MIT", | ||
"homepage": "https://github.com/iSteve-O/homebridge-multiswitcheroo/tree/OffFix", | ||
"homepage": "https://github.com/iSteve-O/homebridge-multiswitcheroo", | ||
"icon": "https://github.com/iSteve-O/homebridge-multiswitcheroo/blob/main/multiswitcheroo.png", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/iSteve-O/homebridge-multiswitcheroo/tree/OffFix" | ||
"url": "git+https://github.com/iSteve-O/homebridge-multiswitcheroo" | ||
}, | ||
@@ -38,3 +39,7 @@ "keywords": [ | ||
"url": "https://github.com/iSteve-O/homebridge-multiswitcheroo/issues" | ||
}, | ||
"funding": { | ||
"type" : "paypal", | ||
"url" : "https://paypal.me/STrenchard" | ||
} | ||
} |
@@ -5,2 +5,3 @@ <p align="left"> | ||
[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) | ||
[![npm version](https://badgen.net/npm/v/homebridge-multiswitcheroo)](https://www.npmjs.com/package/homebridge-multiswitcheroo) | ||
@@ -11,2 +12,4 @@ [![npm downloads](https://badgen.net/npm/dt/homebridge-multiswitcheroo)](https://www.npmjs.com/package/homebridge-multiswitcheroo) | ||
<a href="https://github.com/iSteve-O/homebridge-multiswitcheroo"><img src="https://github.com/iSteve-O/homebridge-multiswitcheroo/blob/b9bd89d218ac9a46e090f4218a7abb23c4fa63bd/multiswitcheroo.png" height="140"></a> | ||
### homebridge-multiswitcheroo | ||
@@ -37,3 +40,3 @@ </br> | ||
The `statusPattern` is a regular expression string (regex) sought in the response from the server to get an accurate status for each switch (see the `Mute` switch in the `MultiSwitcheroo` config example below for a really good example of a complex pattern where an unknown number is present in the string). | ||
The `statusPattern` is a regular expression string (regex) sought in the response from the server to get an accurate status for each switch (see the `Mute` switch in the `MultiSwitcheroo` config example below for a really good example of a complex pattern where an unknown number is present in the string). Remember you must esacape any special characters (including spaces) with a `\`. | ||
@@ -40,0 +43,0 @@ Set the `onUrl` & `offUrl` as appropriate for each switch. Must be the full URL, including `http://` & port. |
70792
7
130