Skip to content
Snippets Groups Projects
Verified Commit 7d00406a authored by Erick Hitter's avatar Erick Hitter
Browse files

Formatting and docs cleanup

parent ab049e33
Branches
No related tags found
No related merge requests found
...@@ -34,8 +34,8 @@ function buttonActivated( mac ) { ...@@ -34,8 +34,8 @@ function buttonActivated( mac ) {
var req = { var req = {
url: homeAssistantUrl + 'states/' + config.home_assistant_alarm_entity_id, url: homeAssistantUrl + 'states/' + config.home_assistant_alarm_entity_id,
headers: { headers: {
"Content-Type": "application/json", 'Content-Type': 'application/json',
"x-ha-access": config.home_assistant_pass 'x-ha-access': config.home_assistant_pass
} }
}; };
...@@ -69,8 +69,11 @@ function buttonActivated( mac ) { ...@@ -69,8 +69,11 @@ function buttonActivated( mac ) {
// Build new request to update state // Build new request to update state
req.method = 'POST'; req.method = 'POST';
req.body = JSON.stringify( { "entity_id": config.home_assistant_alarm_entity_id } ); req.body = JSON.stringify( {
'entity_id': config.home_assistant_alarm_entity_id
} );
// Make request to change alarm status
request( req, function( err, res, body ) { request( req, function( err, res, body ) {
// Handle error states // Handle error states
if ( err ) { if ( err ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment