Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action with Condition #24

Closed
reesion opened this issue Sep 10, 2020 · 11 comments
Closed

Action with Condition #24

reesion opened this issue Sep 10, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@reesion
Copy link

reesion commented Sep 10, 2020

Hi,

is it possible to have a condition for an action ? Like if the Thermostat is below 15 degrees at 6am turn on the heater?

@nielsfaber
Copy link
Owner

It is not supported currently, no.
It is also not really planned, because it will add quite some extra buttons and fields to the GUI, which might get confusing.
But it could be considered if it helps a lot.

For now, if you want to do something like this, you could create a script/automation that has the condition.
This script/automation can be triggered as a schedule.
You could pass the temperature threshold condition as a variable from the card, so no hard-coded level.

@reesion
Copy link
Author

reesion commented Sep 10, 2020

Ok thanks for confirming.
If would be helpful if the features are available as it reduces the need to write manual scripts and automations.

@KTibow
Copy link
Contributor

KTibow commented Sep 12, 2020

Personally, I think it's really easy to make an automation with the GUI, the main reason I use this component is because it's a bit faster.
I think that it's better to have no condition format then a limited condition format, because I don't see the point of recreating Home Assistant's advanced condition system when it'll just lead to lots of bugs.
Sure, I'm be being lazy and not seeing the point, but I think that it's pretty easy to maybe just add a quick link at the bottom to create a new script.

But this could be useful in a couple of ways:

  • Only on workdays, trigger schedule.
  • At the same time every day, if it's a workday or weekday, do one thing, else do another thing.

@EnryDalo
Copy link

Thank you very much for your work, the card is very easy to use and surely the best scheduler available for HA so far.
I think it's a must to include some conditional starting. For example, i would like to progam a climate shedule like the TADO application and would like to include the "at home/away" detection. This is impossible to make without a conditional checking, you could just add a simple one.

@nielsfaber
Copy link
Owner

@EnryDalo adding such functionality is not considered at this point.
There are two alternatives:

  1. Use the scheduler to trigger a script that contains the condition and action. It is possible to pass a variable (such as temperature setpoint) to the script.
  2. Use an automation to check the condition and turn off the schedule when it should not do anything. There is an open request for giving schedules a better name / entity_id, which should facilitate this.

@mycanaletto
Copy link

+1

@KTibow
Copy link
Contributor

KTibow commented Sep 24, 2020

@mycanaletto please hit the +1 emoji so that people can sort by most positive reactions as well.

@nielsfaber
Copy link
Owner

Suggestion of @MatteGary (I post it here because it is a related FR):

It would be awesome to have the possibility to let an automation run if no one is at home, or if someone is at home, like Apple Home App let us do.
I have an automation in Apple Home App that basically is “If no one is at home at 19:00, then turn on my garden light”.
Option should be:
. Run if no one is at home
. Run if someone is at home

@nielsfaber
Copy link
Owner

Conditions are introduced in v1.7.5 so you should be able to make the behavior as you wanted it.
Note that (currently) you cannot set up a condition in combination with an entity attribute, only the state will be checked.
So if you want to use the temperature of a climate entity, you should add a template sensor for this.
Please test this new functionality!

@KTibow
Copy link
Contributor

KTibow commented Oct 10, 2020

A bit more margin between the icon and the text is needed:
image
Also, I think the confirm button:
image
Should probably be the same as:
image
Any docs about this?

@nielsfaber
Copy link
Owner

Closing since this is in place now.
If there is more functionality needed regarding conditions, please let me know! (open new FR for it please).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants