Skip to content

Commit

Permalink
Merge pull request #1 from bitfocus/no-global-rgb
Browse files Browse the repository at this point in the history
Replace global rgb with self.rgb
  • Loading branch information
krocheck authored Jan 1, 2021
2 parents c318cdc + cb04eb4 commit 20f019d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Weather information module for Bitfocus Companion

Companion is a really nice bit of open source software which extends the functionality
Companion is a really nice bit of open source software which extends the functionality
of Elgato Streamdeck devices.

* **Companion**: https://bitfocus.io/companion/
* **Streamdeck**: https://www.elgato.com/en/gaming/stream-deck

Do you want current weather information on a button?<br>
Do you want current weather information on a Companion button?<br>
This module requires an active internet connection and you will need your own API key from <a href="https://openweathermap.org/home/sign_up" title="OpenWeather">OpenWeather.com</a>

## Feedback
Expand All @@ -20,14 +20,14 @@ This module requires an active internet connection and you will need your own AP
* Region or State (if available)
* Country
* Local Time

**Current Information**
* Time updated
* Temperature<sup>1</sup>
* Feels like
* Conditions
* Wind speed<sup>1</sup>
* Wind direction


<sup>1</sup>Choice of metric or imperial units
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var rest_client = require('node-rest-client').Client;
var instance_skel = require('../../instance_skel');
var sharp = require('sharp');
var rgb = require('../../image').rgb;
var debug;
var log;

Expand Down Expand Up @@ -162,8 +161,8 @@ instance.prototype.init_feedbacks = function () {
var ret;
if (self.icons[self.iconID]) {
ret = { png64: self.icons[self.iconID] };
ret.bgcolor = (self.isDay ? rgb(200,200,200): rgb(16,16,16));
ret.color = (self.isDay ? rgb(32,32,32) : rgb(168,168,168));
ret.bgcolor = (self.isDay ? self.rgb(200,200,200): self.rgb(16,16,16));
ret.color = (self.isDay ? self.rgb(32,32,32) : self.rgb(168,168,168));
}
if (ret) {
return ret;
Expand Down Expand Up @@ -205,7 +204,7 @@ instance.prototype.init_presets = function () {
style: 'png',
text: '$(ow:c_text)\\n$(ow:c_temp)',
size: '18',
color: rgb(255,255,255),
color: self.rgb(255,255,255),
bgcolor: 0
},
actions: [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openweather-rest",
"version": "1.0.1",
"version": "1.0.2",
"api_version": "1.0.0",
"keywords": [
"weather"
Expand Down

0 comments on commit 20f019d

Please sign in to comment.