From 4119d865e7954be10495793148305210418a06e6 Mon Sep 17 00:00:00 2001 From: Andrei Avram Date: Thu, 8 Feb 2018 00:21:47 +0200 Subject: [PATCH] added dummy GET request for home assistant compatibility --- app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.js b/app.js index b884830..1e504a6 100644 --- a/app.js +++ b/app.js @@ -175,6 +175,13 @@ app.post('/remotes/:remote/:command', function (req, res) { res.sendStatus(200); }); +// Dummy call to comply with home assistant requirements for status +app.get('/remotes/:remote/:command', function (req, res) { + res.setHeader('Cache-Control', 'no-cache'); + res.sendStatus(200); + res.json({ status: 'OK' }); +}); + // Start sending :remote/:command repeatedly app.post('/remotes/:remote/:command/send_start', function (req, res) { lircNode.irsend.send_start(req.params.remote, req.params.command, function () {});