I have created an input select drop down helper in Home Assistant to sync modes between my Hubitat hub and home assistant, I have this working perfectly but seem to have a strange problem.
The drop down looks like this - I have called this Home Modes
I also have the same drop down which is a sensor created from Hubitat, This is called Hub Mode
I have created 2 home assistant script’s which are triggered by 2 automations to keep these in sync and that part seems to work fine.
The problem I am running into is that if the mode is changes via hubitat one of the scripts will run to change the input select mode and when this happens I seem to lose all the drop down options from the list. This is how the drop down looks after the mode change
it only seems to list whatever the mode was changed to in the drop down rather than all of the option I set, If I go back into the helper section and press update then the mode re-appear.
As far as I can see this is happening when the following script runs.
choose:
- conditions:
- condition: state
entity_id: sensor.hub_mode
state: Home
sequence:
- service: input_select.set_options
target:
entity_id: input_select.home_status
data:
options: Home
- conditions:
- condition: state
entity_id: sensor.hub_mode
state: Night
sequence:
- service: input_select.set_options
target:
entity_id: input_select.home_status
data:
options: Night
- conditions:
- condition: state
entity_id: sensor.hub_mode
state: Away
sequence:
- service: input_select.set_options
target:
entity_id: input_select.home_status
data:
options: Away
- conditions:
- condition: state
entity_id: sensor.hub_mode
state: OnHoliday
sequence:
- service: input_select.set_options
target:
entity_id: input_select.home_status
data:
options: OnHoliday
- conditions:
- condition: state
entity_id: sensor.hub_mode
state: No Automations
sequence:
- service: input_select.set_options
target:
entity_id: input_select.home_status
data:
options: No Automations
default: []