You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love jupyter for creating, maintaining and debugging my HA scripts and templated sensors :)
I got some templated sensors that just get too verbose in jinja2.
So I created a jupyter notebook and proved I could create the same output including updating the already defined sensor... Perfect!
And I found you can use nbconvert to convert the notebook to Python - so far so good..
I could easily see my script nbconvert and upload to HA when ever I save the notebook or similar.
But I had to inject a
@state_trigger("sensor.energy_production_remaining or sensor.energi_data_service_buy or sensor.sonnen_battery_level_kwh or sensor.sonnen_hours_to_charge_window_end", state_check_now=True)
def update_sonnen_needed_charge_hours():
between from datetime import datetime and my actually code.
This won't be the last time I update this script and don't like the idea of me having to copy the changes over manually..
How do everyone else keep your Notebook testbeds synchronized with code in production?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I love jupyter for creating, maintaining and debugging my HA scripts and templated sensors :)
I got some templated sensors that just get too verbose in jinja2.
So I created a jupyter notebook and proved I could create the same output including updating the already defined sensor... Perfect!
And I found you can use nbconvert to convert the notebook to Python - so far so good..
I could easily see my script nbconvert and upload to HA when ever I save the notebook or similar.
But I had to inject a
between
from datetime import datetime
and my actually code.This won't be the last time I update this script and don't like the idea of me having to copy the changes over manually..
How do everyone else keep your Notebook testbeds synchronized with code in production?
Beta Was this translation helpful? Give feedback.
All reactions