DIY وسائل الإعلام الرئيسية الشعار

الموقع النهائي لتصميم وإنشاء مسرح منزلي الخاص ومرحبا فاي الإعداد الخاصة.

0مجموعات Bin في Home Assistant

لقد عملت على تطوير إعداد smarthome المستند إلى Home Assistant لمدة عام تقريبًا الآن (منذ مغادرة SmartThings) وبعد منحنى تعليمي أولي شديد الانحدار ، كنت سعيدًا جدًا بالمساعد المنزلي ، لذلك بدأت في العمل على توسيع نطاق الأشياء التي يقوم بها حيث إنني أعمل على توفير أساس طويل الأجل لمنزل ذكي. أحد الأشياء التي أردت إضافتها هو بيانات جمع bin لتذكيرني بالحاوية المستحقة ومتى. نظرًا لأنني أعيش في شيفيلد ، كنت بحاجة إلى سحب هذه البيانات من مزود المصادر الخارجية للسلطات المحلية (فيوليا). التفاصيل التالية كيف فعلت هذا, البناء كثيرًا على عمل الآخرين الذين فعلوا ذلك بالفعل في مناطق أخرى

Update 10-Aug-2022

I’ve tweaked the script to make it com­pat­ible with home assist­ant after the switch to Python 3

التحديث 20 ديسمبر 2021

I’ve made a change to both ths bash script AND the tem­plate — the first to make sure required pack­ages are avail­able and the second to fix a break­ing change made by recent releases of home assistant

I used a script which i mod­i­fied from vari­ous examples on a HA sup­port thread by Rob­Brad. For this script to run I needed to install the beau­ti­ful­soup mod­ule on home-assistant.

أضف نصًا

  • I use the ‘Samba Share’ super­visor addon to access my home assist­ant files dir­ectly from my win­dows PC — unless you already have a pre­ferred access meth­od I recom­mend doing the same
  • اذهب الى \\ha-ip-address config
  • cre­ate a مخطوطات بيثون ملف
  • Cre­ate a new python script in this folder — I called mine bin_collection.py
  • Insert the fol­low­ing script
  • سوف تحتاج إلى استبدال ############ with the unique num­ber for your prop­erty which I will explain how to get in the next step

احصل على عنوانك الفريد

  • اذهب الى https://wasteservices.sheffield.gov.uk/property/
  • أدخل رمزك البريدي وحدد عنوانك من القائمة
  • قم بتدوين عنوان url الجديد. Use it in the url line in the script above — the only part you will need to change is the 12 digit num­ber at the end

اتصل بالبرنامج النصي الخاص بك من config.yaml

  • إدخال بسيط في config.yaml هو كل ما هو مطلوب لتشغيل البرنامج النصي
  • You may want to adjust the fre­quency of the run. يعمل منجم مرة واحدة في اليوم.

أنشئ كيانات لكل نوع من أنواع الحاوية باستخدام config.yaml

  • Imme­di­ately under the above sec­tion (لذلك لا يزال تحت جهاز الاستشعار: نشوئها ثانية) أضف ما يلي

اعرض النتائج على الواجهة الأمامية

  • To show the res­ults on the front end simply add a card with the 3 أجهزة استشعار عليه (spe­cific­ally sensor.black_bin, جهاز الاستشعار, والمستشعر)
  • Note you may need to restart home assist­ant to load the new sensors you added to configuration.yaml

أعتقد أننا فقدنا شيء ما? دعنا نعلم بتعليقك بالأسفل. إذا كنت ترغب في الاشتراك يرجى استخدام الرابط الاشتراك في القائمة في اعلى اليمين. يمكنك أيضا مشاركة هذا مع أصدقائك باستخدام الروابط الاجتماعية أدناه. في صحتك.

اترك رد