nielsfaber / scheduler-component

Custom component for HA that enables the creation of scheduler entities
GNU General Public License v3.0
622 stars 40 forks source link

Add Additional Attributes: current_action and next_action #295

Closed LenirSantiago closed 9 months ago

LenirSantiago commented 10 months ago

Checklist

Proposal

Add an additional attributes called current_action and next_action. These attributes would displays the action based on current_slot and next_slot.

This way custom sensors can be created based on the attributes. I.e. is the scheduler currently active (slot is other than null) and if so what is it doing (current_action). Or create a sensor is always off unless scheduler is running a specific action...

Additional info

weekdays:
  - thu
timeslots:
  - '12:40:00'
entities:
  - input_boolean.keypad_enable_slot1
actions:
  - service: input_boolean.turn_off
  - service: input_boolean.turn_on 
current_slot: 1
current_action: input_boolean.turn_off
next_slot: 2
next_action: input_boolean.turn_on
next_trigger: '2023-10-19T12:40:00-04:00'
tags: []
icon: mdi:calendar-clock
friendly_name: Keypad Schedule Slot 1

or

weekdays:
  - thu
timeslots:
  - '12:40:00'
entities:
  - input_boolean.keypad_enable_slot1
actions:
  - service: input_boolean.turn_off
  - service: input_boolean.turn_on 
current_slot: null
current_action: null
next_slot: 2
next_action: input_boolean.turn_on
next_trigger: '2023-10-19T12:40:00-04:00'
tags: []
icon: mdi:calendar-clock
friendly_name: Keypad Schedule Slot 1
github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days