rt400 / Jewish-Sabbaths-Holidays

Jewish Shabbat Yomtov and Holidays times and event
9 stars 1 forks source link

"No Info" on is_yomtov #11

Closed aviadlevy closed 2 years ago

aviadlevy commented 2 years ago

Hi, First of all, thanks for this integration

I think the current response for is_yomtov ("No Info") is not good. I would hope to get False.

  1. Can you explain the current behavior and whether this is intentional?
  2. Do you think we can change it so No Info - would be False instead?

If your answer to 2 is yes, I would love to try and open a PR for this change and contribute my first contribution for the HASS community

Thanks

aviadlevy commented 2 years ago

P. S. I know this "issue" can be solved by conditioning:

condition: not 
conditions: 
  - condition: state 
    entity_id: sensor.hebcal_is_yomtov 
    state: 'True'

But still I can't understand the meaning of No Info and why it's not just False

rt400 commented 2 years ago

Hi, thanks for your note... The No Info in the sensor mean that there is no data (like now that there is no yomtov in this week) .

aviadlevy commented 2 years ago

I see. But don't you think it'll be much simple if it will return False in this case? It'll also help in #12

rt400 commented 2 years ago

I do not think that what is good for one user is not necessarily good for the other. In any case it should not affect your automation. Just set the trigger to use to: without from: like this :

  - platform: state
    entity_id: sensor.hebcal_is_yomtov
    to: 'True'