Builtin Cards¶
This document describes the builtin cards.
ClockCard¶
-
class
pie_time.cards.
ClockCard
[source]¶ The clock card.
This card displays a digital clock and date.
Settings dictionary keys:
- time_format (string) - time format string (strftime()
compatible). Defaults to
pie_time.cards.ClockCard.TIME_FORMAT
- time_blink (boolean) - if set to
True
the semicolons will blink. Defaults toTrue
. - time_color (tuple) - time text color. Defaults to
pie_time.cards.ClockCard.GREEN
- date_format (string) - date format string (strftime()
compatible). Defaults to
pie_time.cards.ClockCard.DATE_FORMAT
- date_color (tuple) - date text color. Defaults to
pie_time.cards.ClockCard.GREEN
-
DATE_FORMAT
= '%a, %d %b %Y'¶ Default date format
-
GREEN
= (96, 253, 108)¶ Green color for text
-
TIME_FORMAT
= '%I:%M %p'¶ Default time format
- time_format (string) - time format string (strftime()
compatible). Defaults to
PictureCard¶
-
class
pie_time.cards.
PictureCard
[source]¶ The picture card.
This cards displays a picture from list of pre-defined pictures. If more than one picture is defined, it’s changed each time the card transitions to current card.
Settings dictionary keys:
- urls (list) - required list of picture URLs. Currently, only
file://
,http://
andhttps://
URL schemes are supported.
- urls (list) - required list of picture URLs. Currently, only
WeatherCard¶
-
class
pie_time.cards.
WeatherCard
[source]¶ The weather card.
This cards displays the current weather for a selected city. The weather information is obtained from OpenWeatherMap.
Settings dictionary keys:
- api_key (string) - required API key.
- city (string) - required name of the city.
- units (string) - units name (
metric
orimperial
). Defaults topie_time.cards.WeatherCard.UNITS
- refresh_interval (int) - refresh interval in seconds. Defaults to
pie_time.cards.WeatherCard.REFRESH_INTERVAL
- city_color (tuple) - city text color. Defaults to
pie_time.cards.WeatherCard.WHITE
- icon_color (tuple) - icon text color. Defaults to
pie_time.cards.WeatherCard.WHITE
- temperature_color (tuple) - temperature text color. Defaults to
pie_time.cards.WeatherCard.WHITE
- conditions_color (tuple) - conditions text color. Defaults to
pie_time.cards.WeatherCard.WHITE
-
REFRESH_INTERVAL
= 600¶ Default refresh interval
-
UNITS
= 'metric'¶ Default units
-
WHITE
= (255, 255, 255)¶ White color for text