[weewx-user] Re: Cheetah SearchList And Data Bindnigs

2018-11-11 Thread jonathan koren
Thanks for the link. For some reason I couldn’t find it in the manual.

Just in case someone searches the archive, the correct line is:

$current($data_binding=‘aqi_binding’).aqi_pm2_5


On Sunday, November 11, 2018 at 1:07:48 AM UTC-8, Andrew Milner wrote:
>
> according to the customisation guide 
> http://weewx.com/docs/customizing.htm#Using_multiple_bindings
>
> I think the tag format is something like:
>
> $niculskinLabels.conditions.aqi_pm2_5($data_binding='aqi_binding').current.aqi_pm2_5
>
>
> On Sunday, 11 November 2018 09:14:35 UTC+2, jonathan koren wrote:
>>
>> I'm trying to modify my templates to display data from a new data 
>> binding, but I'm confused about how to do that. It seems like all I need to 
>> do is pass CheetahGenerator a new data binding, but it's not obvious how 
>> you would do that while keeping the default data binding active as well. 
>> This isn't a problem when drawing charts, but filling in HTML templates, it 
>> seems pretty difficult. There might be a way to do this with 
>> search_list_objs, but it's not clear how you actually instantiate those 
>> objects with a data binding that isn't from CheetahGenerator. I'm kind of 
>> at a loss.
>>
>> For reference, here's a broken snippet from my index.html.tmpl
>>
>> 
>> $niculskinLabels.conditions.out_temp$current.outTemp
>> 
>> $niculskinLabels.conditions.aqi_pm2_5$aqi_binding.current.aqi_pm2_5
>>
>> This doesn't work because aqi_binding, isn't defined in the 
>> CheetahGenerator search list.
>>
>> From what I can tell, I only need to do is change the binding everything 
>> will just work, but getting two bindings to work with one template, is not 
>> clear at all.
>>
>> Any thoughts on how to do this?
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Cheetah SearchList And Data Bindnigs

2018-11-11 Thread Andrew Milner
according to the customisation guide 
http://weewx.com/docs/customizing.htm#Using_multiple_bindings

I think the tag format is something like:
$niculskinLabels.conditions.aqi_pm2_5($data_binding='aqi_binding').current.aqi_pm2_5


On Sunday, 11 November 2018 09:14:35 UTC+2, jonathan koren wrote:
>
> I'm trying to modify my templates to display data from a new data binding, 
> but I'm confused about how to do that. It seems like all I need to do is 
> pass CheetahGenerator a new data binding, but it's not obvious how you 
> would do that while keeping the default data binding active as well. This 
> isn't a problem when drawing charts, but filling in HTML templates, it 
> seems pretty difficult. There might be a way to do this with 
> search_list_objs, but it's not clear how you actually instantiate those 
> objects with a data binding that isn't from CheetahGenerator. I'm kind of 
> at a loss.
>
> For reference, here's a broken snippet from my index.html.tmpl
>
> 
> $niculskinLabels.conditions.out_temp$current.outTemp
> 
> $niculskinLabels.conditions.aqi_pm2_5$aqi_binding.current.aqi_pm2_5
>
> This doesn't work because aqi_binding, isn't defined in the 
> CheetahGenerator search list.
>
> From what I can tell, I only need to do is change the binding everything 
> will just work, but getting two bindings to work with one template, is not 
> clear at all.
>
> Any thoughts on how to do this?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.