Open z3r0l1nk opened 1 year ago
@z3r0l1nk the actual link in your description is not the displayed text.
[https://github.com/z3r0l1nk/StarDate](https://github.com/th3jesta/ha-lcars/issues/url)
https://github.com/z3r0l1nk/StarDate is enough. Don't need to do the markdown. ;-)
I have set up the following templates for calculating stardates:
- trigger:
- platform: time_pattern
seconds: "/1" # Every 2 seconds
sensor:
- name: stardate
icon: mdi:rocket-launch-outline
state: >
{% set uu = as_timestamp(utcnow()) %}
{% set doty = states('sensor.daysintheyear')|float %}
{{ (1000 * ((uu/86400/doty) + 25)) + ((uu/86400) % 1) }}
attributes:
last_updated: "{{ states('sensor.time') }}"
- sensor:
- name: DaysInTheYear
state: "{{strptime('12/31/'+((states('sensor.date')|as_datetime).year|string), '%m/%d/%Y').timetuple().tm_yday|float}}"
Here's how it looks on my dash:
@gridlockjoe, very nice dash.
Hi, If we use LCARS... let's go full startrek mode then :) Me and a friend have created a small python script that will show the current stardate, more information on my github repo below. https://github.com/z3r0l1nk/StarDate What do you think @th3jesta ?