Skip to content

0.0.4b1

Pre-release
Pre-release

Choose a tag to compare

@gadgetchnnel gadgetchnnel released this 02 Jun 19:10
188e319

Added options to control source of start and end time of calendar event, via start_time and end_time options. These both take a time object:

time object

Option Description
timestamp_in_state (Optional) Setting this to true forces the state to be used for the start/end time event if the device class is not "timestamp"
timestamp_attribute (Optional) Setting this to the name of an attribute will use that for the time (even for "timestamp") entities

Example

Given three sensors:

  • sensor.attribute_test - a sensor with a start_time and end_time attribute
  • sensor.state_test - a sensor with a timestamp in the state but without a device_class of "timestamp"
  • sensor.default_test - a sensor with a device_class of "timestamp"

The following configuration would be used:

calendar:
  - platform: entities_calendar
    calendars:
      - name: Entities
        entities:
          - entity: sensor.attribute_test
            name: Attribue Test
            start_time:
              timestamp_attribute: start_time
            end_time:
              timestamp_attribute: end_time
          - entity: sensor.state_test
            name: State Test
            start_time:
              timestamp_in_state: true
            end_time:
              timestamp_in_state: true
          - entity: sensor.default_test
            name: Default Test