pjarbit

config.yaml

Sep 25th, 2024
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.53 KB | None | 0 0
  1. # Loads default set of integrations. Do not remove.
  2. default_config:
  3.  
  4. # Load frontend themes from the themes folder
  5. frontend:
  6. themes: !include_dir_merge_named themes
  7.  
  8. automation: !include automations.yaml
  9. script: !include scripts.yaml
  10. scene: !include scenes.yaml
  11.  
  12. # Custom Panels
  13. panel_custom:
  14. - name: Supervisor
  15. url_path: hassio/system
  16. sidebar_title: Supervisor
  17. sidebar_icon: mdi:home-assistant
  18. module_url: /local/panel-redirect.js
  19.  
  20. # Custom warning template for Lovelace
  21. template:
  22. - sensor:
  23. - name: "All Conditions Met"
  24. state: >
  25. {% set conditions = [
  26. states('lock.pja1_lock') == 'locked',
  27. states('binary_sensor.pja1_tire_warning') == 'off',
  28. states('binary_sensor.pja1_low_wash_water_warning') == 'off',
  29. states('binary_sensor.pja1_low_brake_fluid_warning') == 'off',
  30. states('sensor.pja1_sunroof_status') == '0',
  31. states('sensor.pja1_front_left_window') == '2',
  32. states('sensor.pja1_front_right_window') == '2',
  33. states('sensor.pja1_rear_left_window') == '2',
  34. states('sensor.pja1_rear_right_window') == '2',
  35. states('binary_sensor.pja1_front_left_door_open') == 'off',
  36. states('binary_sensor.pja1_front_right_door_open') == 'off',
  37. states('binary_sensor.pja1_rear_left_door_open') == 'off',
  38. states('binary_sensor.pja1_rear_right_door_open') == 'off',
  39. states('binary_sensor.pja1_decklid_open') == 'off',
  40. states('binary_sensor.pja1_hood_open') == 'off',
  41.  
  42. (states('lock.fpa1_lock') == 'locked' or states('device_tracker.fpa1_device_tracker') == 'home'),
  43. states('binary_sensor.fpa1_tire_warning') == 'off',
  44. states('binary_sensor.fpa1_low_wash_water_warning') == 'off',
  45. states('binary_sensor.fpa1_low_brake_fluid_warning') == 'off',
  46. states('binary_sensor.fpa1_low_coolant_fluid_warning') == 'off',
  47. states('sensor.fpa1_sunroof_status') == '0',
  48. states('sensor.fpa1_front_left_window') == '2',
  49. states('sensor.fpa1_front_right_window') == '2',
  50. states('sensor.fpa1_rear_left_window') == '2',
  51. states('sensor.fpa1_rear_right_window') == '2',
  52. states('binary_sensor.fpa1_front_right_door_open') == 'off',
  53. states('binary_sensor.fpa1_rear_left_door_open') == 'off',
  54. states('binary_sensor.fpa1_rear_right_door_open') == 'off',
  55. states('binary_sensor.fpa1_decklid_open') == 'off',
  56. states('binary_sensor.fpa1_hood_open') == 'off',
  57.  
  58. states('binary_sensor.kitchen_door_wall_sensor_2') == 'off',
  59. states('binary_sensor.generac_1057423_is_connected') == 'on',
  60. states('binary_sensor.garage_fridge_2') == 'off'
  61. ] %}
  62.  
  63. {{ conditions | reject('equalto', false) | list | count == 0 }}
  64.  
  65. - name: "Unmet Conditions List"
  66. state: >
  67. {% set unmet_conditions = [] %}
  68.  
  69. {% if states('lock.pja1_lock') != 'locked' %}
  70. {% set unmet_conditions = unmet_conditions + ['PJA1 Lock'] %}
  71. {% endif %}
  72. {% if states('binary_sensor.pja1_tire_warning') != 'off' %}
  73. {% set unmet_conditions = unmet_conditions + ['PJA1 Tire Warning'] %}
  74. {% endif %}
  75. {% if states('binary_sensor.pja1_low_wash_water_warning') != 'off' %}
  76. {% set unmet_conditions = unmet_conditions + ['PJA1 Low Wash Water Warning'] %}
  77. {% endif %}
  78. {% if states('binary_sensor.pja1_low_brake_fluid_warning') != 'off' %}
  79. {% set unmet_conditions = unmet_conditions + ['PJA1 Low Brake Fluid Warning'] %}
  80. {% endif %}
  81. {% if states('sensor.pja1_sunroof_status') != '0' %}
  82. {% set unmet_conditions = unmet_conditions + ['PJA1 Sunroof Status'] %}
  83. {% endif %}
  84. {% if states('sensor.pja1_front_left_window') != '2' %}
  85. {% set unmet_conditions = unmet_conditions + ['PJA1 Front Left Window'] %}
  86. {% endif %}
  87. {% if states('sensor.pja1_front_right_window') != '2' %}
  88. {% set unmet_conditions = unmet_conditions + ['PJA1 Front Right Window'] %}
  89. {% endif %}
  90. {% if states('sensor.pja1_rear_left_window') != '2' %}
  91. {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Left Window'] %}
  92. {% endif %}
  93. {% if states('sensor.pja1_rear_right_window') != '2' %}
  94. {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Right Window'] %}
  95. {% endif %}
  96. {% if states('binary_sensor.pja1_front_left_door_open') != 'off' %}
  97. {% set unmet_conditions = unmet_conditions + ['PJA1 Front Left Door'] %}
  98. {% endif %}
  99. {% if states('binary_sensor.pja1_front_right_door_open') != 'off' %}
  100. {% set unmet_conditions = unmet_conditions + ['PJA1 Front Right Door'] %}
  101. {% endif %}
  102. {% if states('binary_sensor.pja1_rear_left_door_open') != 'off' %}
  103. {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Left Door'] %}
  104. {% endif %}
  105. {% if states('binary_sensor.pja1_rear_right_door_open') != 'off' %}
  106. {% set unmet_conditions = unmet_conditions + ['PJA1 Rear Right Door'] %}
  107. {% endif %}
  108. {% if states('binary_sensor.pja1_decklid_open') != 'off' %}
  109. {% set unmet_conditions = unmet_conditions + ['PJA1 Decklid'] %}
  110. {% endif %}
  111. {% if states('binary_sensor.pja1_engine_hood_open') != 'off' %}
  112. {% set unmet_conditions = unmet_conditions + ['PJA1 Hood'] %}
  113. {% endif %}
  114.  
  115. {% if states('lock.fpa1_lock') != 'locked' and states('device_tracker.fpa1_device_tracker') != 'home' %}
  116. {% set unmet_conditions = unmet_conditions + ['FPA1 Lock'] %}
  117. {% endif %}
  118. {% if states('binary_sensor.fpa1_tire_warning') != 'off' %}
  119. {% set unmet_conditions = unmet_conditions + ['FPA1 Tire Warning'] %}
  120. {% endif %}
  121. {% if states('binary_sensor.fpa1_low_wash_water_warning') != 'off' %}
  122. {% set unmet_conditions = unmet_conditions + ['FPA1 Low Wash Water Warning'] %}
  123. {% endif %}
  124. {% if states('binary_sensor.fpa1_low_brake_fluid_warning') != 'off' %}
  125. {% set unmet_conditions = unmet_conditions + ['FPA1 Low Brake Fluid Warning'] %}
  126. {% endif %}
  127. {% if states('binary_sensor.fpa1_low_coolant_level_warning').strip() != 'off' %}
  128. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Coolant Fluid Warning'] %}
  129. {% endif %}
  130. {% if states('sensor.fpa1_sunroof_status') != '0' %}
  131. {% set unmet_conditions = unmet_conditions + ['FPA1 Sunroof Status'] %}
  132. {% endif %}
  133. {% if states('sensor.fpa1_front_left_window') != '2' %}
  134. {% set unmet_conditions = unmet_conditions + ['FPA1 Front Left Window'] %}
  135. {% endif %}
  136. {% if states('sensor.fpa1_front_right_window') != '2' %}
  137. {% set unmet_conditions = unmet_conditions + ['FPA1 Front Right Window'] %}
  138. {% endif %}
  139. {% if states('sensor.fpa1_rear_left_window') != '2' %}
  140. {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Left Window'] %}
  141. {% endif %}
  142. {% if states('sensor.fpa1_rear_right_window') != '2' %}
  143. {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Right Window'] %}
  144. {% endif %}
  145. {% if states('binary_sensor.fpa1_front_left_door_open') != 'off' %}
  146. {% set unmet_conditions = unmet_conditions + ['FPA1 Front Left Door'] %}
  147. {% endif %}
  148. {% if states('binary_sensor.fpa1_front_right_door_open') != 'off' %}
  149. {% set unmet_conditions = unmet_conditions + ['FPA1 Front Right Door'] %}
  150. {% endif %}
  151. {% if states('binary_sensor.fpa1_rear_left_door_open') != 'off' %}
  152. {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Left Door'] %}
  153. {% endif %}
  154. {% if states('binary_sensor.fpa1_rear_right_door_open') != 'off' %}
  155. {% set unmet_conditions = unmet_conditions + ['FPA1 Rear Right Door'] %}
  156. {% endif %}
  157. {% if states('binary_sensor.fpa1_decklid_open') != 'off' %}
  158. {% set unmet_conditions = unmet_conditions + ['FPA1 Decklid'] %}
  159. {% endif %}
  160. {% if states('binary_sensor.fpa1_engine_hood_open') != 'off' %}
  161. {% set unmet_conditions = unmet_conditions + ['FPA1 Hood'] %}
  162. {% endif %}
  163.  
  164. {{ unmet_conditions | join(', ') }}
  165.  
  166. - name: "Unmet Car Conditions"
  167. state: >
  168. {% set unmet_car_conditions = [] %}
  169.  
  170. {% if states('lock.pja1_lock') != 'locked' %}
  171. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Lock'] %}
  172. {% endif %}
  173. {% if states('binary_sensor.pja1_tire_warning') != 'off' %}
  174. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Tire Warning'] %}
  175. {% endif %}
  176. {% if states('binary_sensor.pja1_low_wash_water_warning') != 'off' %}
  177. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Low Wash Water Warning'] %}
  178. {% endif %}
  179. {% if states('binary_sensor.pja1_low_brake_fluid_warning') != 'off' %}
  180. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Low Brake Fluid Warning'] %}
  181. {% endif %}
  182. {% if states('sensor.pja1_sunroof_status') != '0' %}
  183. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Sunroof Status'] %}
  184. {% endif %}
  185. {% if states('sensor.pja1_front_left_window') != '2' %}
  186. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Left Window'] %}
  187. {% endif %}
  188. {% if states('sensor.pja1_front_right_window') != '2' %}
  189. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Right Window'] %}
  190. {% endif %}
  191. {% if states('sensor.pja1_rear_left_window') != '2' %}
  192. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Left Window'] %}
  193. {% endif %}
  194. {% if states('sensor.pja1_rear_right_window') != '2' %}
  195. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Right Window'] %}
  196. {% endif %}
  197. {% if states('binary_sensor.pja1_front_left_door_open') != 'off' %}
  198. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Left Door'] %}
  199. {% endif %}
  200. {% if states('binary_sensor.pja1_front_right_door_open') != 'off' %}
  201. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Front Right Door'] %}
  202. {% endif %}
  203. {% if states('binary_sensor.pja1_rear_left_door_open') != 'off' %}
  204. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Left Door'] %}
  205. {% endif %}
  206. {% if states('binary_sensor.pja1_rear_right_door_open') != 'off' %}
  207. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Rear Right Door'] %}
  208. {% endif %}
  209. {% if states('binary_sensor.pja1_decklid_open') != 'off' %}
  210. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Decklid'] %}
  211. {% endif %}
  212. {% if states('binary_sensor.pja1_engine_hood_open') != 'off' %}
  213. {% set unmet_car_conditions = unmet_car_conditions + ['PJA1 Hood'] %}
  214. {% endif %}
  215.  
  216. {% if states('lock.fpa1_lock') != 'locked' and states('device_tracker.fpa1_device_tracker') != 'home' %}
  217. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Lock'] %}
  218. {% endif %}
  219. {% if states('binary_sensor.fpa1_tire_warning') != 'off' %}
  220. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Tire Warning'] %}
  221. {% endif %}
  222. {% if states('binary_sensor.fpa1_low_wash_water_warning') != 'off' %}
  223. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Wash Water Warning'] %}
  224. {% endif %}
  225. {% if states('binary_sensor.fpa1_low_brake_fluid_warning') != 'off' %}
  226. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Brake Fluid Warning'] %}
  227. {% endif %}
  228. {% if states('binary_sensor.fpa1_low_coolant_level_warning').strip() != 'off' %}
  229. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Low Coolant Fluid Warning'] %}
  230. {% endif %}
  231. {% if states('sensor.fpa1_sunroof_status') != '0' %}
  232. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Sunroof Status'] %}
  233. {% endif %}
  234. {% if states('sensor.fpa1_front_left_window') != '2' %}
  235. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Left Window'] %}
  236. {% endif %}
  237. {% if states('sensor.fpa1_front_right_window') != '2' %}
  238. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Right Window'] %}
  239. {% endif %}
  240. {% if states('sensor.fpa1_rear_left_window') != '2' %}
  241. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Left Window'] %}
  242. {% endif %}
  243. {% if states('sensor.fpa1_rear_right_window') != '2' %}
  244. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Right Window'] %}
  245. {% endif %}
  246. {% if states('binary_sensor.fpa1_front_left_door_open') != 'off' %}
  247. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Left Door'] %}
  248. {% endif %}
  249. {% if states('binary_sensor.fpa1_front_right_door_open') != 'off' %}
  250. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Front Right Door'] %}
  251. {% endif %}
  252. {% if states('binary_sensor.fpa1_rear_left_door_open') != 'off' %}
  253. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Left Door'] %}
  254. {% endif %}
  255. {% if states('binary_sensor.fpa1_rear_right_door_open') != 'off' %}
  256. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Rear Right Door'] %}
  257. {% endif %}
  258. {% if states('binary_sensor.fpa1_decklid_open') != 'off' %}
  259. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Decklid'] %}
  260. {% endif %}
  261. {% if states('binary_sensor.fpa1_engine_hood_open') != 'off' %}
  262. {% set unmet_car_conditions = unmet_car_conditions + ['FPA1 Hood'] %}
  263. {% endif %}
  264.  
  265. {{ unmet_car_conditions | join(', ') }}
  266.  
  267. - name: "PJA1 Front Left Window"
  268. state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusfrontleft') }}"
  269. device_class: enum
  270.  
  271. - name: "PJA1 Front Right Window"
  272. state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusfrontright') }}"
  273. device_class: enum
  274.  
  275. - name: "PJA1 Rear Left Window"
  276. state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusrearleft') }}"
  277. device_class: enum
  278.  
  279. - name: "PJA1 Rear Right Window"
  280. state: "{{ state_attr('binary_sensor.pja1_windows_closed', 'windowstatusrearright') }}"
  281. device_class: enum
  282.  
  283. - name: "FPA1 Front Left Window"
  284. state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusfrontleft') }}"
  285. device_class: enum
  286.  
  287. - name: "FPA1 Front Right Window"
  288. state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusfrontright') }}"
  289. device_class: enum
  290.  
  291. - name: "FPA1 Rear Left Window"
  292. state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusrearleft') }}"
  293. device_class: enum
  294.  
  295. - name: "FPA1 Rear Right Window"
  296. state: "{{ state_attr('binary_sensor.fpa1_windows_closed', 'windowstatusrearright') }}"
  297. device_class: enum
  298.  
  299. - binary_sensor:
  300.  
  301. - name: "PJA1 Front Left Door Open"
  302. state: "{{ state_attr('sensor.pja1_lock', 'doorstatusfrontleft') }}"
  303. device_class: door
  304. - name: "PJA1 Front Right Door Open"
  305. state: "{{ state_attr('sensor.pja1_lock', 'doorstatusfrontright') }}"
  306. device_class: door
  307. - name: "PJA1 Rear Left Door Open"
  308. state: "{{ state_attr('sensor.pja1_lock', 'doorstatusrearleft') }}"
  309. device_class: door
  310. - name: "PJA1 Rear Right Door Open"
  311. state: "{{ state_attr('sensor.pja1_lock', 'doorstatusrearright') }}"
  312. device_class: door
  313. - name: "PJA1 Decklid Open"
  314. state: "{{ state_attr('sensor.pja1_lock', 'decklidstatus') }}"
  315. device_class: door
  316.  
  317.  
  318. - name: "FPA1 Front Left Door Open"
  319. state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusfrontleft') }}"
  320. device_class: door
  321. - name: "FPA1 Front Right Door Open"
  322. state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusfrontright') }}"
  323. device_class: door
  324. - name: "FPA1 Rear Left Door Open"
  325. state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusrearleft') }}"
  326. device_class: door
  327. - name: "FPA1 Rear Right Door Open"
  328. state: "{{ state_attr('sensor.fpa1_lock', 'doorstatusrearright') }}"
  329. device_class: door
  330. - name: "FPA1 Decklid Open"
  331. state: "{{ state_attr('sensor.fpa1_lock', 'decklidstatus') }}"
  332. device_class: door
  333.  
  334.  
  335. - name: "FPA1 Engine Hood Open"
  336. state: "{{ state_attr('sensor.fpa1_lock', 'engineHoodStatus') }}"
  337. device_class: door
  338. - name: "PJA1 Engine Hood Open"
  339. state: "{{ state_attr('sensor.pja1_lock', 'engineHoodStatus') }}"
  340. device_class: door
  341.  
  342.  
  343. - name: "PJA1 Charging Power Valid"
  344. state: >
  345. {% set charging_power = states('sensor.pja1_charging_power') | float(default=0) %}
  346. {% if charging_power > 1 %}
  347. valid
  348. {% else %}
  349. invalid
  350. {% endif %}
  351.  
  352. # Switches (camera inclusion)
  353. switch: !include switches.yaml
  354.  
  355. # Recorder section
  356. recorder:
  357. purge_keep_days: 7
  358. commit_interval: 30
  359. exclude:
  360. entities:
  361. - sensor.time
  362. - sensor.date
  363.  
  364. # Logger section
  365. logger:
  366. default: info
  367. logs:
  368. homeassistant.components.google: error
  369. homeassistant.components.calendar: error
  370. homeassistant.components.tplink: warning
  371. haffmpeg.core: error
  372. homeassistant.components.cloud: debug
  373. homeassistant.helpers.aiohttp_client: debug
  374.  
  375. # Logbook section
  376. logbook:
  377.  
  378. # History section
  379. history:
  380.  
  381. cloud:
  382.  
  383. # Add ffmpeg to Home Assistant
  384. ffmpeg:
  385.  
Advertisement
Add Comment
Please, Sign In to add comment