-
-
Notifications
You must be signed in to change notification settings - Fork 44
Winter credit #61
Comments
same for me, my openhab is ready but I need to activate it manually. It would be nice to have a status for it. |
If I can help (test or otherwise) let me know and I'll be happy to. |
I created a PR for this, you will see the message you see in your account for today and tomorrow in 2 new MQTT sensors or with command line. You will need to process the message to extract the time in your Home Assistant (or anything else). |
I just downloaded the PR, for now my "today_message", today_times and tomorrow_message and tomorrow_times are "unknown" in Home Assistant, I imagine because there is no message for today or tomorrow, but I'll update when I get one, and how I integrate this with HA. For now, I have a node-red flow that executes at each 6 hours, that check my unread mails and applies a regex on the hydro message to get the times. It works, but I'd like to get rid of that. |
Hi, yes the "unknown" is because there is nothing yet today. For home assistant I use this automation : - id: 'xxxxxxxxxxx'
alias: Tarif Dynamique Hydro-Québec AutoON AM
description: Lire MQTT et mettre les input_boolean a ON automatique
trigger:
- platform: state
entity_id: sensor.hydroquebec_xxxxxxxxx_today_times
condition:
- condition: template
value_template: "{% if states(\"sensor.hydroquebec_xxxxxxxxx_today_times\") ==\
\ \"unknown\" or states(\"sensor.hydroquebec_xxxxxxxxx_today_times\") == \"\
\" or states(\"sensor.hydroquebec_xxxxxxxxx_today_times\") == \"{}\" %}\n \
\ False\n{% else %}\n {% set today_times = states(\"sensor.hydroquebec_xxxxxxxxx_today_times\"\
)|from_json %}\n {% if today_times.today_start_1 != \"\" and today_times.today_end_1\
\ != \"\" %}\n {% if states(\"sensor.time\") < \"{:02}:{:02}\".format(today_times.today_start_1\
\ | int, 0) %} \n True\n {% else %}\n False\n {%\
\ endif %}\n {% else %}\n False\n {% endif %}\n {% endif %}"
action:
- service: input_boolean.turn_on
data: {}
entity_id: input_boolean.tarif_dynamique_am
mode: single I use this 2 of those automation (one for AM and one for PM replacing today_start_1 by today_start_2 ans end_1 by end_2) to turn on an input boolean to on. Then I have other automations based on time and with the condition that this input boolean is turned on to adjust the temperature. With the MQTT server in docker and with the config_cron.yaml and entrypoint_cron.sh it will check at 2 am every day so well before the minimum time to turn down the heat. |
It works. FYI the messages are "unknown" until pyhydroquebec runs for the first time, then the today_message and tomorrow_message show empty, and the today_times and tomorrow_times have the default value of '{}' (empty json string) When an event occurs, I get for example this: {"tomorrow_start_1": "6", "tomorrow_end_1": "9", "tomorrow_start_2": "", "tomorrow_end_2": ""} which i run through JSON.parse in a nodered function, to get the values, and then act accordingly. Nice, thank you very much, I can confirm this works well, and on top of it, I'm over 130$ in credits this winter! |
I search a solution for Hydro Flex with the 2 last lines https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/portrait-de-consommation/resourceObtenirInfoCommunPortrait |
Hi, I made a pull request for this last year. It is already working in my fork. Thanks |
Strange as it seems, I was running https://github.com/titilambert/pyhydroquebec and applying the PR for the winter credit, but it does not work anymore. What I mean is that that pyhydroquebec works, but the home assistant hydroquebec_xxxxxxxxx_today_message and others are undefined now. Same code was working last year. So I switched to using directly https://github.com/tech165/pyhydroquebec and the topics are back. If this can help someone. I wonder why this change has not been merged to the "official" pyhydroquebec yet. |
Is there plan to add winter credit support? I would be interested to know when there is peak event.
https://www.hydroquebec.com/residentiel/espace-clients/tarifs/option-credit-hivernal.html
The text was updated successfully, but these errors were encountered: