Skip to content

Commit

Permalink
Merge pull request #26 from andrewjswan/add_timestamp_option
Browse files Browse the repository at this point in the history
SvitloBot: Add `add timestamp` option. Add timestamp to message
  • Loading branch information
andrewjswan authored Nov 22, 2024
2 parents f39e7d7 + ebc59e5 commit a4fb58f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dtekinfo/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: DTEKInfo
version: 2024.9.11
version: 2024.11.1
slug: dtekinfo
description: DTEKInfo checks the last message on the public channel that warns about blackouts, filters the message and sends it to your private channel or group.
url: https://github.com/andrewjswan/blackout-addons/tree/master/dtekinfo
Expand Down
4 changes: 4 additions & 0 deletions svitlobot-monitor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2024.11.11 - 2024-11-22

- Add `add timestamp` option. Add timestamp to message

## 2024.11.9 - 2024-11-22

- Fix `night time`
Expand Down
3 changes: 2 additions & 1 deletion svitlobot-monitor/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: SvitloBot Monitor
version: 2024.11.9
version: 2024.11.11
slug: svitlobot-monitor
description: SvitloBot Monitor check the data from SvitloBot API and send the electricity switching on or off tendency indication for the appropriate DTEK group to the appropriate telegram user/chat/group/forum.
url: https://github.com/andrewjswan/blackout-addons/tree/master/svitlobot-monitor
Expand Down Expand Up @@ -50,4 +50,5 @@ schema:
min: int(0,100)?
max: int(0,100)?
night_time: str?
add_timestamp: bool?
debug: bool?
7 changes: 5 additions & 2 deletions svitlobot-monitor/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export TELEGRAM_TOPIC_ID=0
options+=(--language uk)
options+=(--group $(bashio::config 'group'))
options+=(--refresh-interval 5)
options+=(--add-timestamp)
options+=(--time-zone "Europe/Kiev")

bashio::log.info 'SvitloBot Monitor Starting...'
Expand Down Expand Up @@ -94,8 +93,12 @@ if bashio::config.exists 'night_time'; then
bashio::log.blue " Night Time: $(bashio::config 'night_time')"
options+=(--night-time $(bashio::config 'night_time'))
fi
if bashio::config.true 'add_timestamp'; then
bashio::log.info " Add timestamp to message."
options+=(--add-timestamp)
fi
if bashio::config.true 'debug'; then
bashio::log.info " Setting debug mode"
bashio::log.info " Setting debug mode."
options+=(--debug)
fi
bashio::log.info 'SvitloBot Monitor Start'
Expand Down
3 changes: 3 additions & 0 deletions svitlobot-monitor/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ configuration:
night_time:
name: Night Time
description: Interval in hours, when the script is sending messages in silent mode. Format is "start:stop" in 24h format
add_timestamp:
name: Add Timestamp
description: Add timestamp to message
debug:
name: Debug
description: Debug level of logging

0 comments on commit a4fb58f

Please sign in to comment.