File tree 3 files changed +0
-14
lines changed
3 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -95,17 +95,6 @@ private static function formatDoorStatus($url) {
95
95
return 'Door: ' . htmlspecialchars ($ data ['latch ' ]) . ' and ' . htmlspecialchars ($ data ['door ' ]);
96
96
}
97
97
98
- private static function formatLightsStatus ($ url ) {
99
- try {
100
- $ data = static ::getJson ($ url );
101
- }
102
- catch (Exception $ e ) {
103
- return 'Lights status not available: ' . $ e ->getMessage ();
104
- }
105
-
106
- return 'Lights: ' . htmlspecialchars ($ data ['status ' ]) . ', policy: ' . htmlspecialchars ($ data ['policy ' ]);
107
- }
108
-
109
98
private static function formatUsers ($ url ) {
110
99
try {
111
100
$ data = static ::getJson ($ url );
@@ -251,7 +240,6 @@ private static function formatMusic($url) {
251
240
private static function getStatus (array $ config ) {
252
241
return
253
242
static ::formatDoorStatus ($ config ['door_url ' ]) . PHP_EOL .
254
- //static::formatLightsStatus($config['lights_url']) . PHP_EOL .
255
243
static ::formatMqttStatus ($ config ['mqtt ' ]) . PHP_EOL .
256
244
static ::formatMusic ($ config ['music_url ' ]) . PHP_EOL .
257
245
static ::formatUsers ($ config ['users_url ' ]);
Original file line number Diff line number Diff line change 24
24
]]);
25
25
26
26
define ('STATUS_DOOR_URL ' , 'https://example.com/door/status.json ' );
27
- define ('STATUS_LIGHTS_URL ' , 'https://example.com/lights/status.json ' );
28
27
define ('STATUS_MQTT ' , [
29
28
'url ' => 'http://example.com/status ' ,
30
29
'timeout ' => 20 ,
Original file line number Diff line number Diff line change 52
52
53
53
$ telegram ->setCommandConfig ('status ' , [
54
54
'door_url ' => STATUS_DOOR_URL ,
55
- 'lights_url ' => STATUS_LIGHTS_URL ,
56
55
'mqtt ' => STATUS_MQTT ,
57
56
'music_url ' => STATUS_MUSIC_URL ,
58
57
'users_url ' => STATUS_USERS_URL ,
You can’t perform that action at this time.
0 commit comments